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
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!