Reputation: 518
What's the best way to connect to a google cloud SQL DB from a google container engine pod? The doc implies I should request an IPV4 address for the DB and connect through that.
I wonder whether there's a better way using the DB's name instead?
Is there something similar to using the /cloudsql/<db_name>
socket connection in App Engine?
Upvotes: 0
Views: 150
Reputation: 13377
It may not be the best answer, but you could always set up a DNS name for it.
I don't know whether there's any built-in way to use the name instead of the IP. App Engine can do special nice things for you because it runs your code in a specially managed run-time environment.
Upvotes: 1