Skip to content

Best way to connect external client directly to pod on a range of ports? #129

Answered by zackproser
zackproser asked this question in Help
Discussion options

You must be logged in to vote

This is generally handled by a Service or Ingress, depending on the type of application and how you are connecting to it. The easiest would be to use a NodePort type Service (which is better than using hostNetworking with the container because the container doesn’t have to have privileged access). This is best described in the blog post https://dzone.com/articles/kubernetes-exposing-services.

The disadvantage of NodePort is that there is only a finite number of ports you can expose, which can easily run out depending on how many pods you want to expose. The next general approach is to use Ingress. The idea of Ingress is to run a load balancer application in your cluster which manages the …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by zackproser
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment