1

I need to

  • expose some pods directly on nodes, for TCP & UDP
  • be able to access them externally, individually

I would like to avoid creating a loadbancer service for each pod as there is no need of loadbalancing, just the exposure to outside world.

I don see any solution with Service or Ingress.

All this happens in GKE.

Would someone have an idea?

thanks!

unludo
  • 4,912
  • 7
  • 47
  • 71

1 Answers1

2

If your nodes are accessible from the outside world you can get away with just hostNetwork: true, there are some potential issues with it though (ie. just one pod per host or potential port conflicts with other stuff on node). You don't need any service defined for it, as it will just listen on your nodes ports (need to have them open on firewall, security policies or whatever guards your nodes from external world).

Any use of service (except for maybe headless one) will result in a loadbalancing between all backing pods (be it ClusterIP, NodePort or LB), but only LB service will give you a dedicated external IP.

Radek 'Goblin' Pieczonka
  • 21,554
  • 7
  • 52
  • 48
  • OK I created a pod with hostNetwork:true, opened the ip/port on the firewall, and it works with the public ip of the node. Thanks! – unludo Dec 23 '17 at 09:52