美文网首页
Kubernetes CornJob时区问题

Kubernetes CornJob时区问题

作者: 橘子基因 | 来源:发表于2021-12-27 18:06 被阅读0次

    CornJob发送时间为kube-controller-manager组件的时间,修改/etc/kubernetes/manifests/kube-controller-manager.yaml文件,挂载节点的localtime到kube-controller-manager组件容器里即可。

    修改vim /etc/kubernetes/manifests/kube-controller-manager.yaml文件

        volumeMounts:
        - mountPath: /etc/ssl/certs
          name: ca-certs
          readOnly: true
        - mountPath: /etc/pki
          name: etc-pki
          readOnly: true
        - mountPath: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
          name: flexvolume-dir
        - mountPath: /etc/kubernetes/pki
          name: k8s-certs
          readOnly: true
        - mountPath: /etc/kubernetes/controller-manager.conf
          name: kubeconfig
          readOnly: true
        - mountPath: /etc/localtime ##挂载localtime到容器里
          name: localtime
          readOnly: true
      hostNetwork: true
      priorityClassName: system-node-critical
      volumes:
      - hostPath:
          path: /etc/ssl/certs
          type: DirectoryOrCreate
        name: ca-certs
      - hostPath:
          path: /etc/pki
          type: DirectoryOrCreate
        name: etc-pki
      - hostPath:
          path: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
          type: DirectoryOrCreate
        name: flexvolume-dir
      - hostPath:
          path: /etc/kubernetes/pki
          type: DirectoryOrCreate
        name: k8s-certs
      - hostPath:
          path: /etc/kubernetes/controller-manager.conf
          type: FileOrCreate
        name: kubeconfig
      - hostPath:  ##当前节点localtime
          path: /etc/localtime 
        name: localtime
    status: {}
    

    相关文章

      网友评论

          本文标题:Kubernetes CornJob时区问题

          本文链接:https://www.haomeiwen.com/subject/ihwyqrtx.html