k8s-组件容器时区修改

# 挂在主机时区文件模版

...
      volumeMounts:
        - mountPath: /etc/localtime
          name: host-time
          readOnly: true
...
    volumes:
      - hostPath:
          path: /etc/localtime
          type: ""
        name: host-time


# 修改etcd

vi /etc/kubernetes/manifests/etcd.yaml
...
    - mountPath: /etc/localtime
      name: host-time
      readOnly: true
...
  - hostPath:
      path: /etc/localtime
      type: ""
    name: host-time


# 修改kube-controller-manager

vi /etc/kubernetes/manifests/kube-controller-manager.yaml
...
    - mountPath: /etc/localtime
      name: host-time
      readOnly: true
...
  - hostPath:
      path: /etc/localtime
      type: ""
    name: host-time


# 修改kube-scheduler

vi /etc/kubernetes/manifests/kube-scheduler.yaml
...
    - mountPath: /etc/localtime
      name: host-time
      readOnly: true
...
 
上一篇:C++时间戳与时间日期格式互相转换


下一篇:Java常用类07:JDK 1.8新特性日期时间类