<p>I am trying to setup google kubernetes engine and its pods has to communicate with cloud sql database. The cloud sql database credentials are stored on google cloud secret manger. How pods will fetch credentials from secret manager and if secret manager credentials are updated than how pod will get update the new secret?</p>
<p>How to setup above requirement? Can you someone please help on the same?</p>
<p>Thanks,
Anand</p>

<p>You can make your deployed application get the secret (password) programmatically, from Google Cloud Secret Manager. You can find and example in many languages in the following link: <a href="https://cloud.google.com/secret-manager/docs/samples/secretmanager-access-secret-version" rel="nofollow noreferrer">https://cloud.google.com/secret-manager/docs/samples/secretmanager-access-secret-version</a></p>
<p>But before make sure that your GKE setup, more specifically your application is able to authenticate to Google Cloud Secret Manager. The following links can help you to choose the appropriate approche:</p>
<ul>
<li><a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform</a></li>
<li><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity</a></li>
</ul>
