1.

I have a configmap for 3 files that are going to be mounted in supposing "fluentd/etc/" and the respective files would be fluent.conf,  kubernetes.conf, systemd.conf, config map in deployment.yaml is like this

Answer»

configmaps are ALWAYS mounted read-only. if you need to modify a configmap in a POD, you should COPY it from the configmap mount to a regular file in the pod and then modify it. To solve this issue we should use an init container to mount the configmap, copy the configmap into an `emptyDir` volume and share the volume with the main container.

configmaps are mounted read-only so that you can't touch the files. when the MASTER configmap changes the mounted file also changes. so if you were to modify the local mounted file, it would be overwritten anyways.



Discussion

No Comment Found

Related InterviewSolutions