Relative Content

Tag Archive for kubernetesconfigmapkustomizepersistent-volume-claimslonghorn

How to mount a configMap into a persistentVolumeClaim?

So, I’m trying to teach myself kubernetes by example, and I’ve found a scenario I can’t seem to find a good solution to. The general scenario is a container requires a config to have a path like /config/system.xml, but there are also auto-created embedded databases and such also created in /config. So, my initial thought was to have a persistentVolumeClaim for /config, and simply mount the configMap into the PVC. The problem I’m having is, system.xml IS mounted, and has the correct content, but also has owner/group = root, and the container logs indicate the /config/system.xml is a “read-only” filesystem.