k8s 设置deployment,时pod挂载本地时间问题同步底层时间到容器

spec:
volumes:
  • name: time-localtime
    hostPath:
    path: /etc/localtime
    type: ‘

volumeMounts:

  • name: time-localtime
    readOnly: true
    mountPath: /etc/localtime
    此设置不需要配置PodPreset,但针对java项目,可能会发生时区针对java程序无法生效

相关推荐