node(s) didn't have free ports for the requested pod ports

Viewed 8066

Deployed an ingress-controller in default namespace and tried to deployed in another namespace as well but have been getting this error:

0/8 nodes are available: 8 node(s) didn't have free ports for the requested pod ports.

but saw a similar error with a solution saying, You don't need to deploy multiple ingress controllers in a cluster. Ingress controller deployed in a namespace should be able to work across the cluster for all pods across all namespace. Ingress controller generally have clusteroles which permits it to access ingress, services. endpoints across the cluster for all namespaces.

0/3 nodes are available: 1 node(s) didn't have free ports for the requested pod ports, 2 node(s) didn't match node selector

So, is it ok if i have it working in one namepsace?

1 Answers

Problem described in link you have mentioned is connected with traefik.

Overally such error is scheduling related issue. It is produced by the kubernetes scheduler. It is not related to ingress-nginx.
You should check what is using the ports.

Take a look: ingress-scheduler.

Also speaking about multiple Ingress Controllers in cluster.

For example if you are using NGINX Ingress Controller, you have three options with regards to which configuration resources it handles:

  • Single-namespace Ingress Controller - it handles configuration resources only from a particular namespace, which is controlled through the --watch-namespace command-line flag. It is useful if you want to use different NGINX Ingress Controllers for different applications, both in aspect of isolation and/or operation.
  • Cluster-wide Ingress Controller - it handles configuration resources created in any namespace of the cluster. As NGINX is a high-performance load balancer capable of serving many applications at the same time, this option is used by default.
  • Ingress Controller for Specific Ingress Class. It works in conjunction with either of the options above. You can further customize which configuration resources are handled by the Ingress Controller by configuring the class of the Ingress Controller and using that class in your configuration resources.

By default such controllers are cluster wide - they handle resources created in any namespace, so there is no need to create multiple controllers to be sure that they will work for resources in every namespace.

Read more: ingress-controllers.

Related