<p>I have deployed a Kubernetes cluster to GCP. For this cluster, I added some deployments. Those deployments are using external resources that protected with security policy to reject connection from unallow IP address. </p>

<p>So, in order to pod to connect the external resource, I need manually allow the node (who hosting the pod) IP address.</p>

<p>It's also possible to me to allow range of IP address, where one of my nodes are expected to be running. </p>

<p>Untill now, I just find their internal IP addresses range. It looks like this:</p>

<pre><code>Pod address range 10.16.0.0/14
</code></pre>

<p>The question is how to find the <strong>range of external</strong> IP addresses for my nodes? </p>

No1Lives4Ever
<p>Let's begin with the IPs that are assigned to Nodes:</p>

<ul>
<li>When we create a Kubernetes cluster, GCP in the backend creates compute engines machines with a specific internal and external IP address.</li>
<li>In your case, just go to the compute engine section of the Google Cloud Console and capture all the external IPs of the VM whose initials starts with gke-(*) and whitelist it.</li>
<li>Talking about the range, as such in GCP only the internal IP ranges are known and external IP address are randomly assigned from a pool of IPs hence you need to whitelist it one at a time.</li>
</ul>

<p>To get the pod description and IPs run <code>kubectl describe pods</code>.</p>
