Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to set pod time in Kubernetes

Shulou Source: shulou.com Published: 2022-06-03 03:39:07 10月03日 Update

How to set pod time in Kubernetes? I believe that many novice rookies have not yet learned this skill. Through the summary of this article, I hope you can learn this skill. The following materials are the steps for implementation.

1 time introduction

1.1 GMT

Greenwich time. The standard time where Greenwich is located.

1.2 UTC

World Standard time (GMT). Namely: UTC = GMT + 0. The time in the container is UTC.

1.3 CST

Chinese standard time. CST = GMT + 8.

1.4 EST

Eastern time. EST = GMT-5. If the current machine is in the time zone of New York, the date display is EST.

2 set pod time

Usually, the time zone of the CVM is the world standard time, which is 8 hours different from the Chinese standard time.

2.1 the time of hanging in the host to the container

VolumeMounts:-mountPath: / etc/localtime name: localtimevolumes:- hostPath: path: / etc/localtime type: "" name: localtime2.2 passes parameters to pod

Spec: containers:-env:-name: TZ value: Asia/Shanghai2.3 passes parameters to pod

Spec: containers:-env:-name: TZ value: CST-8 after reading this article, have you learned how to set the pod time in Kubernetes? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel. Thank you for reading.

Tags: Time Standard Standard time skills World Container that is location time Zone more articles Green China Greenwich East content Host hours situation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Huawei Redmi OPPO Reno Linux