This message was deleted.
# google-cloud
s
This message was deleted.
d
It's worth testing with the credentials file in k8s, so you know your networking is working. I think the 'connect' log you're seeing is actually the api for fetching a certificate, not an actual db connection. https://cloud.google.com/sql/docs/mysql/admin-api/rest#rest-resource:-v1.connect
Good news is, that means your workload identity is working :)
l
Thanks Anthony, I'll give that a go 🙂 You're right about the connect log too, I saw further down it has
Copy code
request: {
  @type: "<http://type.googleapis.com/google.cloud.sql.v1.GenerateEphemeralCertRequest|type.googleapis.com/google.cloud.sql.v1.GenerateEphemeralCertRequest>"
...
}
Update: I updated the Job code, hardcoding JSON Service Account credentials to verify that what works locally isn't working in GKE (it still didn't work in GKE). I then stripped back the cluster configuration to the bare essentials and removed the cluster network / subnet setup. Once I did this, the job connected to CloudSQL 🙂 So, I guess I'll have to do some reading up on networks / cluster configs. For now I'm happy that I can talk to the DB!
d
Glad you managed to narrow it down. I've got to do all this for my clusters soon. Absolutely dreading it, all the network configs are currently commented out 🤣 Hoping this will help: https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview
👍 1