GCP MySQL with private IP not reachable from GKE

12/11/2018

I have a mysql instance running with private IP enabled. When I try to connect using mysql-client from GKE container I get connection timeouts.

But mysql-client from VM instances is able to reach the server.

I verified that MySQL, VM instance, GKE all running with default network in same zone.

-- Siva
google-cloud-platform
google-cloud-sql
google-kubernetes-engine

1 Answer

12/11/2018

Turns out Alias IP should be enabled on GKE to access SQL with private IP.

-- Siva
Source: StackOverflow