I have an image called http
which has a file called httpd-isec.conf
. I'd like to edit httpd-isec.conf
before the image is started by kubernetes. Is that possible?
Would initContainers
and mounting the image work in some way?
Yes please add a boot script in your image to edit the file . You could also create a custom image and put you http image as base image for it and edit the file on init
This is not possible. Images are immutable. What you can do is use an init container to copy the file to an emptyDir volume, edit it, and then mount that volume over the original file in the main container.