<p>let's say, creating a configMap with a file from an ephemeral pod A, will this configMap be deleted after pod A is deleted? If it's true, what about creating a configMap from a file in a PV? In this way, even if pod A is gone, the file that our configMap was created from still exists so that the configMap will be preserved.</p>

Steve Wu
<blockquote>
<p>let's say, creating a configMap with a file from an ephemeral pod A,
will this configMap be deleted after pod A is deleted?</p>
</blockquote>
<p>No, if you create the config map from one file and attach that configmap to POD, on the deletion of POD that configmap won't get deleted.</p>
<p>You can use it with other deployment or POD also in the future and the file will be saved inside the config map as it is unless you update it.</p>
<p>Any changes to <strong>POD</strong> or <strong>POD with PV</strong> won't affect the <strong>config map</strong> it's a different resource.</p>
<p>You can inject a file to POD or PV using <strong>configmap</strong> and update that file or do operations on that file, but those changes won't be saved in the <strong>configmap</strong>.</p>
<p>If you are using POD with PV, your <strong>configmap</strong> injected file to PV so now your POD has access to the file and your application is performing an operation on that file. If PV, PVC there then file will be there saved inside it but again those changes won't get done in configmap.</p>
