<p>I want to be able to deploy several, single pod, apps and access them on a single IP address leaning on Kubernetes to assign the ports as they are when you use a <code>NodePort</code> service.</p>

<p>Is there a way to use <code>NodePort</code> with a load balancer?</p>

<p>Honestly, NodePort might work by itself, but GKE seems to block direct access to the nodes. There doesn't seem to be firewall controls like on their unmanaged VMs.</p>

<p>Here's a service if we need something to base an answer on. In this case, I want to deploy 10  these services which are different applications, on the same IP, each publicly accessible on a different port, each proxying port 80 of the nginx container.</p>

<pre><code>---
apiVersion: v1
kind: Service
metadata:
  name: foo-svc
spec:
  selector:
    app: nginx
  ports:
    - name: foo
      protocol: TCP
      port: 80
  type: NodePort
</code></pre>

Coder1
<blockquote>
  <p>Is there a way to use NodePort with a load balancer?</p>
</blockquote>

<p>Kubernetes LoadBalancer type service builds on top of NodePort. So internally LoadBalancer uses NodePort meaning when a loadBalancer type service is created it automatically maps to the NodePort. Although it's tricky but possible to create NodePort type service and manually configure the Google provided loadbalancer to point to NodePorts.</p>
