How to keep file from mounted volume and create new container with that file? How to keep file from mounted volume and create new container with that file? kubernetes kubernetes

How to keep file from mounted volume and create new container with that file?


If you can store the file into the ConfigMap you can mount the file to volume and use it inside the Kubernetes.

I am not sure with the type of file you have to use.

ConfigMap will inject this file into the volume of a POD so the application could access and use it.

In this case there will be no PVC required.

You can also follow this nice example showing how to mount the file into a volume inside a pod.

OR

Also, I am not sure about the docker image but if you can use that docker image you can add the file into the path, something like:

FROM <docker image>ADD file ./container/folder/

In this case, you might have to check you can use the vendor docker image as a base and add the file into it.