Skip to content
This repository has been archived by the owner on Jun 24, 2020. It is now read-only.

Missing connection information in MySQL binding #215

Open
arapulido opened this issue Oct 22, 2018 · 1 comment
Open

Missing connection information in MySQL binding #215

arapulido opened this issue Oct 22, 2018 · 1 comment

Comments

@arapulido
Copy link

I have created a MySQL instance using the GCP k8s service broker and a binding for it.

The only output for the binding I get is connectionName and serviceAccount.

Is there anything missing? (i.e. host). How am I supposed to use those so my K8s app can connect to it?

@mszostok
Copy link

mszostok commented Nov 13, 2018

Hi @arapulido, some time ago I tested GCP broker. And you are getting correct information from binding action. You need to use the cloudsql-proxy configured with given connectionName and serviceAccount. The cloudsql-proxy need to be executed locally on your Pod, so another process can reach the database by calling proxy. If you are programming in Go then you can use that library directly in your code.

Here is how it used in deployment: https://github.com/GoogleCloudPlatform/kubernetes-engine-samples/blob/master/service-catalog/cloud-sql-mysql/manifests/user-deployment.yaml#L46-L66

And here you find the complete tutorial for cloud-sql-mysql.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants