Delete database client certificate

If you have deleted your application and recreate it, there might be an issue that your new app will not be able to create a client certificate because the old one still exists. Your deploy may fail with an error message such as the one below:

MountVolume.SetUp failed for volume "sqeletor-sql-ssl-cert" : secret "sqeletor-<podname>" not found

To delete the database client credentials for your application, in Google Cloud Console navigate to Cloud SQL instances -> -> Connections -> Security, and then scroll down to Manage client certificates and delete your certificate there.

This can also be done using the gcloud-cli.

$ gcloud sql ssl client-certs delete COMMON_NAME --instance=INSTANCE

COMMON_NAME is usually equal to INSTANCE, which is usually equal to application name. Run kubectl describe sqlsslcert <certificate> to find COMMON_NAME and INSTANCE for one specific certificate.