<p>I have a Cloud MySQL instance which allows traffic only from whitelisted IPs. How do I determine which IP I need to add to the ruleset to allow traffic from my Kubernetes service?</p>

<p>The best solution is to use the Cloud SQL Proxy in a sidecar pattern. This adds an additional container into the pod with your application that allows for traffic to be passed to Cloud SQL.</p>

<p>You can find instructions for setting it up <a href="https://cloud.google.com/sql/docs/mysql/connect-kubernetes-engine" rel="nofollow noreferrer">here</a>. (It says it's for GKE, but the principles are the same) </p>

<p>If you prefer something a little more hands on, <a href="https://github.com/GoogleCloudPlatform/gmemegen" rel="nofollow noreferrer">this</a> codelab will walk you through taking an app from local to on a Kubernetes Cluster.</p>
