Are Kubernete's ConfigMaps Writable?

后端 未结 3 1229
刺人心
刺人心 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:43

    Yes a configmap is not intended to be writeable. If you're interacting with files from a configmap then you could instead put the files in a writeable volume and mount the volume. Or you could, as you suggest, use centralised configuration like consul. Given, that the app is dynamically writing to this data you could consider it state rather than configuration. Then it could be stored in a database. Another option could be a distributed cache such as redis or hazelcast.

提交回复
热议问题