yaml文件中设置时区同步,只需要映射主机的“/etc/localtime”文件。
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
?name: myweb
spec:
?replicas: 2
?template:
???metadata:
?????labels:
???????app: myweb
???spec:
?????containers:
?????- name: myweb
???????image: harbor/tomcat:8.5-jre8
???????volumeMounts:
???????- name: host-time
?????????mountPath: /etc/localtime
???????ports:
???????- containerPort: 80
?????volumes:
?????- name: host-time
???????hostPath:
?????????path: /etc/localtime
---------------------
作者:Bboy-AJ-任杰
来源:CSDN
原文:https://blog.csdn.net/u013201439/article/details/79436413
版权声明:本文为博主原创文章,转载请附上博文链接!
kubernetes 里面pod时间修改
原文地址:https://www.cnblogs.com/hixiaowei/p/10241870.html