<p>I have a subnet mask for my subnet set to 10.0.0.0/9.  When setting up kubernetes, google asks for a master ip range for kubernets.  I set this to 10.0.0.0/28 but I have no idea if this is correct or how these two things are related?  Is there any info on that?</p>

<p>Also, did I do that right?  I assume the kubernetes has to be using the ips of the subnet.</p>

<p>thanks,
Dean</p>

<p>"Master IP Range" is only relevant in GKE when you enable <strong>Private Network</strong>.</p>

<p>When creating a private cluster, the <code>Master IP Range</code> has the following information message:</p>

<blockquote>
  <p>Master IP range is a private RFC 1918 range for the master's VPC. The master range must not overlap with any subnet in your cluster's VPC. The master and your cluster use VPC peering to communicate privately.
  This setting is permanent.</p>
</blockquote>

<ul>
<li>Since 10.0.0.0/28 is a range inside 10.0.0.0/9, it will not effectively isolate the cluster.
I Created a vpc subnet with 10.0.0.0/9 and tried to create the cluster with Master IP Range 10.0.0.0/28, look at the message I get while creating it:</li>
</ul>

<p><a href="https://i.stack.imgur.com/D1wxx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D1wxx.png" alt="enter image description here"></a></p>

<p>If you look at <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters" rel="nofollow noreferrer">Creating a Private GKE Cluster</a> you can find many configuration examples for different access types.</p>

<p>Example:
If your subnet is 10.0.0.0/9 you must use a Master IP Range outside of that range.</p>

<ul>
<li>Since the first half of /9 ends in 10.127.255.255 you can set master network to be anything inside 10.128.0.0/9, 172.16.0.0/12 or 192.168.0.0/16 as long it does not overlaps any other vpc or subnet in your project.</li>
</ul>

<p>Here you can learn more about <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/network-overview#inside-cluster" rel="nofollow noreferrer">GKE Networking</a>.</p>

<p>If you have any doubts let me know in the comments.</p>
