<p>I'm trying to connect to a CloudSQL database from a container running in Kubernetes (not Google). I can connect using for instance IntelliJ, but Kubernetes refuses to connect</p>
<blockquote>
<p>failed to connect to <code>host=&lt;ip&gt; user=user database=db</code>: failed to
write startup message (x509: cannot validate certificate for 
because it doesn't contain any IP SANs)</p>
</blockquote>
<p>The message is connect in that the information is indeed missing in the certificate generated by Google.</p>
<p>Then how am I supposed to connect?</p>

Martin01478
<p>As per the <a href="https://github.com/GoogleCloudPlatform/gke-cloud-sql-postgres-demo" rel="nofollow noreferrer">github</a> you can connect to cloud SQL (Postgres) instance using Cloud SQL Proxy container as sidecar container.</p>
