<p>I am new to the kubernetes world and I have a basic doubt with respect to container restart.
I have few environment variables set from values yaml during the creation of deployment.
When the container restarts due to some reason, what happens to these environment variables ?
Will they be having the values which were set at the time of pod creation ?</p>
<p>Please help me here.</p>

ysn
<p>When a pod of a Deployment dies, a new pod is created from the spec defined in the Deployment. So, if you have overwritten the environment variable in the <code>yaml</code> spec (using <code>kubectl edit</code>, etc.), you'll see the values that was updated else you'll see the default values that were defined in the helm values while creating the Deployment.</p>
<p>Technically, the same applies to containers as well. It's just that if you have multiple containers within the pod and one of them dies, a new pod is not created but the container is restarted using the same values that is present in the pod spec that was created from Deployment spec.</p>
