美文网首页
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时区问题

    CornJob发送时间为kube-controller-manager组件的时间,修改/etc/kubernete...

  • Java 中的时区理解和处理

    本文内容:1,时区了解一下2,产生时区的原因3,常用时间类,哪些是有会导致时区问题4,开发中如何避免产生时区问题 ...

  • 时区问题

    //获取格林威治标准时间public void getGMTTime() {//mothed 2TimeZone ...

  • 时区问题

    2020-11-10 00:00:00 +0000 ---> GMT+0 尼林格日标准时间 也就是 0时区。 ...

  • Mysql更新时区表

    时区问题 Django项目做了数据库迁移后有时候出现时区上的问题,例如django项目中设置的时区是TIME_Z...

  • Centos 7 系统时区问题

    Centos 7 系统时区问题

  • K8S面试题

    基本的 Kubernetes 面试问题 什么是 Kubernetes? 答:kubernetes是一个开源容器管理...

  • ubuntu 18 查看和修改时区

    碰到问题:在ubuntu下调用crontab调用接口时间不对,是时区不对,通过下面的步骤解决时区问题 查看时间: ...

  • 详解 Kubernetes Pod imagePullPolic

    详解 Kubernetes Pod imagePullPolicy 问题背景 Kubernetes 管理下的容器会...

  • NSDate 时区问题

    https://blog.csdn.net/sqc3375177/article/details/53608867

网友评论

      本文标题:Kubernetes CornJob时区问题

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