<p>I have used some bitnami charts in my kubernetes app. In my pod, there is a file whose path is /etc/settings/test.html. I want to override the file. When I search it, I figured out that I should mount my file by creating a configmap. But how can I use the created configmap with the <strong>existed pod</strong> . Many of the examples creates a new pod and uses the created config map. But I dont want to create a new pod, I wnat to use the existed pod.</p>
<p>Thanks</p>

<p>If not all then almost all pod specs are immutable, meaning that you can't change them without destroying the old pod and creating a new one with desired parameters. There is <em>no way</em> to edit pod volume list without recreating it.</p>
<p>The reason behind this is that pods aren't meant to be immortal. Pods meant to be temporary units that can be spawned/destroyed according to scheduler needs. In general, you need a workload object that does pod management for you (a <code>Deployement</code>, <code>StatefulSet</code>, <code>Job</code>, or <code>DaemonSet</code>, depenging on deployment strategy and application nature).</p>
<p>There are two ways to edit a file in an existing pod: either by using <code>kubectl exec</code> and console commands to edit the file in place, or <code>kubectl cp</code> to copy an already edited file into the pod. I advise you against <em>both of these</em>, because this is not permanent. Better backup the necessary data, switch deployment type to <code>Deployment</code> with one replica, then go with mounting a <code>configMap</code> as you read on the Internet.</p>
