<p>I have a secret, and I mounted it as a volume inside a deployment.</p>
<p>If I update the secrets value later, will the new updated value gets automatically reflected as well inside the deployment pods which I volume mounted the secret?</p>
<p><strong>Note:</strong></p>
<p>I am following the answer here to update the secret</p>
<p><a href="https://stackoverflow.com/questions/45879498/how-can-i-update-a-secret-on-kubernetes-when-it-is-generated-from-a-file">How can I update a secret on Kubernetes when it is generated from a file?</a></p>
<p>Thanks in advance.</p>

<p>From the docs <a href="https://kubernetes.io/docs/concepts/configuration/secret/#mounted-secrets-are-updated-automatically" rel="nofollow noreferrer">here</a></p>
<blockquote>
<p>When a secret currently consumed in a volume is updated, projected
keys are eventually updated as well. The kubelet checks whether the
mounted secret is fresh on every periodic sync.</p>
<p><strong>Note</strong>: A container using a Secret as a subPath volume mount will not receive Secret updates.</p>
</blockquote>
<p>Your application need to reload the changed file to have the change effective either by watching for change in file system or by restarting the pod. Check this related discussion <a href="https://stackoverflow.com/questions/37317003/restart-pods-when-configmap-updates-in-kubernetes">here</a></p>
