Are Kubernete's ConfigMaps Writable?

后端 未结 3 1222
刺人心
刺人心 2021-01-02 08:49

Is it possible to directly modify the file mounted by configMap? We have an application that reads a configuration file that was configMap type and

3条回答
  •  失恋的感觉
    2021-01-02 09:36

    AFAIK the changes to a ConfigMap will only exist locally in-memory.
    That is, changes aren't visible to other pods and on a pod restart the changes will be lost.

    One solution is to use the kubectl binary or the kubernetes API from within the configuring application to recreate the ConfigMap after the configuration changes.

    e.g. kubectl apply -f /path/to/updated/config.yaml

提交回复
热议问题