For testing purposes, I deploy two versions of my application on the same machine. On production, only one application instance runs in one cloud Kubernetes cluster and uses the ingress-nginx controller to expose its API.
I use kind to run a Kubernetes cluster locally and deploy the application versions into two different namespaces. I configure the ingress controller according to the kind and ingress-nginx Multiple controllers documentation. The first instance of my app works as expected, but when I deploy the second one, the controller pod fails to start with the following message:
0/6 nodes are available: 1 node(s) didn't have free ports for the requested pod ports, 5 node(s) didn't match Pod's node affinity/selector
As far as I understand, two ingress controller pods are scheduled on the same node and cannot share the same port. Please advise how to proceed further. Should the second controller pod be scheduled to a different node? As kind maps node ports to the host machine, is it possible to map the same ports of multiple nodes to the host machine?