<p>Usually we expose our Kubenretes services through an managed K8s/GCP Ingress with auto-assigned NodePorts, but for some <a href="https://github.com/GoogleCloudPlatform/k8s-multicluster-ingress" rel="nofollow noreferrer">use</a> <a href="https://kubernetes.io/docs/tasks/administer-federation/ingress/" rel="nofollow noreferrer">cases</a> we need to specify a static NodePort ourselves.</p>

<p>The <a href="https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport" rel="nofollow noreferrer">documentation</a> says that we need to make sure to avoid port collissions:</p>

<blockquote>
  <p>you need to take care about possible port collisions yourself</p>
</blockquote>

<p><strong>Q: How should how we choose the correct NodePort?</strong></p>

<p>Should we / do we have to allocate our static NodePort from the <em>flag-configured range (default: 30000-32767)</em>?</p>

<p>Or rather not from this range to avoid collisions with these auto-assigned ports?</p>

<p>It is more about not assigning the same port manually to multiple services then anything else. If you have a manualy defined NodePort it will not get assigned to dynamic service, so yes, you should use port from this range.</p>
