I was following this tutorial for deploying Django App to Kubernetes Cluster. I've created cloudsql credentials and exported them as in the tutorial
export DATABASE_USER=<your-database-user>
export DATABASE_PASSWORD=<your-database-password>
However my password was generated by LastPass and contains special characters, which are striped out in Kubernetes Pod thus making the password incorrect.
This is my password (altered, just showing the special chars)
5bb4&sL!EB%e
So i've tried various ways of exporting this string, echoing it out always show correct password, however in Kubernetes Dashboard the password is always incorrect (Also altered in DevTools, but some chars are just stripped out)
Things I've tried
export DATABASE_PASSWORD=$'5bb4&sL\!EB\%e'
export DATABASE_PASSWORD='5bb4&sL!EB%e'
Echoing is always good but kubernetes is always stripping it.
Deploying with skaffold deploy
EDIT:
After hint I've tried to store the password in base64 encoding form, however I suspect it only applies to local scope, as the password in Kubernetes Dashboard is still the same, I suspect that I need to regenerate the certificate to make this work remotely on gke cluster?
So the env variables are for local and credentials in cloud sql proxy are the ones that are being used and misinterpreted? Where are those files by the way?
EDIT2:
I've just found out that indeed the gke cluster in using the credentials json rather than the exported variables. The configuration json already contains the password in base64 encoded form, HOWEVER it is base64 encode of string which still is missing special characters. Looks like the only way out is to generate new credentials without specials characters, that looks like a bug, doesnt it?