GCP: Kubernetes engine Alias IPs & Cloud SQL Proxy

7/17/2018

Do I need to set up Alias IPs in order for my Pods to be able to connect to Cloud SQL using the Cloud SQL Proxy?

-- Bart
google-cloud-platform
google-cloud-sql
google-kubernetes-engine

1 Answer

7/31/2018

You do not need to set Alias IPs for the pods to connect to Cloud SQL via the Cloud SQL Proxy.

You just have to update the pod configuration file. Instructions on how to do so can be found in this article. Basically, you would need to run a proxy container which exposes port 3306.

With Alias IPs, there are a few restrictions and limitations.

1- You are adding overhead, which could slow down the response time.

2- As per the GCP documentation, and as you’ve mentioned, it is not possible to migrate an existing cluster from a cluster that does not use Alias IPs to a cluster that does.

-- Mahmoud Sharif
Source: StackOverflow