Kubernetes Proxy Sidecar One per pod or behind service?

Visto 241 veces
Saltar al primer mensaje no leído

Joe Andaverde

no leída,
18 may 2018, 16:35:2218/5/18
a Google Cloud SQL discuss
The documentation for how to connect to CloudSQL from Kubernetes is to add a sidecar pod. 

We have many different types of deployments that require database connection does it make sense to expose the proxy via a service running in a separate single deployment? 

Further, it suggests creating a proxyuser. It seems I should continue using the username/password as I've always used instead of creating one specific to a proxy. Any more information I'm missing here?

Thanks!

Joe


Fady (Google Cloud Platform)

no leída,
19 may 2018, 16:09:4619/5/18
a Google Cloud SQL discuss

Hello Joe,


Following this tutorial, the container containing your application, and the Cloud SQL proxy container (sidecar) should be tightly coupled in a single manageable entity (Pod) per your deployment (wordpress example), and the same applies for each replica pod. This is the recommended method to use with Kubernetes. But, I am not sure if it would be ideal for your use case. That said, and as you mentioned you may test  deploying Cloud SQL proxy as a cluster service using Helm per this Github example


To answer your last question about the username, the tutorial for clarity reasons, and for easier cleanup ( when you finish the example) suggests to create a new username. It is not necessary if you already have a username/password you plan to use. I hope that helps.


Joe Andaverde

no leída,
19 may 2018, 19:12:1419/5/18
a Google Cloud SQL discuss
Thank you! I will do something akin to the Helm example.
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos