<p>I have created a GKE cluster using teraform scripts as private cluster. </p>

<p>The worker nodes are assigned with private IPs (starting with 9.X.X.X) and I am able to to ssh. However, my kube master has been assigned with (172.X.X.X), I am able to connect through gcloud shell.</p>

<p>How can I connect kube master via terminal using ssh? </p>

Sunil Gajula
<p>In GKE you can not see the master node from the UI. So, you don't know the public IP of the master node. Hence you can not ssh to kube master from your local terminal.</p>

<p>You can get the cluster credential by running:</p>

<pre><code>$ gcloud container clusters get-credentials ${CLUSTER_NAME}
</code></pre>
