【发布时间】:2018-02-01 11:10:48
【问题描述】:
我尝试使用 configMap 在子目录中挂载一些配置。例如:
spec.template.spec.containers.[0].volumeMounts:
- name: fh16-volume
mountPath: /etc/fh-16/application.log
subPath: my-config.txt
spec.template.spec.volumes:
- name: fh16-volume
configMap:
name: my-config
在这种情况下,所有安装都按预期进行。但是在 configMap 发生任何更改后,此更改不会应用到容器中。需要为此重新创建 pod。
它看起来像一些错误,但也许我在配置中犯了一些错误?在我不使用 subPath 指令的情况下,一切都按预期工作。
【问题讨论】:
标签: kubernetes