How to merge two configmaps using volume mount in kubernetes

前端 未结 5 1744
醉酒成梦
醉酒成梦 2021-01-04 20:38

I am having two different config maps test-configmap and common-config. I tried to mount them at the same location, but one config map over

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-04 21:20

    One way would be to mount them at different points but in the same emptyDir volume, mounting that same volume into an init container and including a short script in the init container to merge the two files using whatever tools you install at the start of the script. Scripts can easily be included in the pod manifest using the technique in this answer.

提交回复
热议问题