Port unavailable in Kubernetes pod
I have a three node Kubernetes cluster and a deployment with 5 replicas. Each pod of the deployment exposes port :3401 and :4000 (one for debugging, and one for the application). I have two services (one for each port the pods expose). I have an ingress controller, and a single ingress for the application that is exposed by the application service.
Three of my pods are able to start while the other two log the following error:
main: error: server error: listen tcp :3401: bind: address already in use
Is it possible to have more pods than nodes listening on a single port using Kubernetes? If so, where would I go about debugging this issue?
I had the following lines in my pod spec for the deployment:
hostNetwork: true
Must have copied and pasted it from somewhere without thinking. :(