我尝试使用 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
Run Code Online (Sandbox Code Playgroud)
在这种情况下,所有内容都会按预期安装。但在 configMap 发生任何更改后,此更改不会应用到容器中。需要为此重新创建 pod。
它看起来像是一些错误,但也许我在配置中犯了一些错误?在我不使用 subPath 指令的情况下,一切都会按预期工作。
归档时间: |
|
查看次数: |
5112 次 |
最近记录: |