<p>I have to edit elasticsearch.yml in order to create a backup (setting the path.repo like this is necessary):
<code>path.repo: /mnt/backup</code></p>

<p>But I have elasticsearch running on Kubernetes, and I would like to set the path.repo from a statefulset or something similar to all pods at the same time.
Can anyone tell me how to do that?
Thanks</p>

<p>I tried to do this with configmap like this:
<a href="https://discuss.elastic.co/t/modify-elastic-yml-file-in-kubernetes-pod/103612" rel="nofollow noreferrer">https://discuss.elastic.co/t/modify-elastic-yml-file-in-kubernetes-pod/103612</a></p>

<p>but when I restarted the pod it threw an error:
<code>/usr/share/elasticsearch/bin/run.sh: line 28: ./config/elasticsearch.yml: Read-only file system</code></p>

fbede
<p>ConfigMaps are mounted to pods as read-only filesystems, this behavior cannot be changed. </p>

<p>If you want to be able to modify config once for all pods then you have to mount config/ directory as a ReadWriteMany persistent volume (NFS, GlusterFS and so on). </p>
