Kubernetes can i have multiple ingress in different nodes?

Viewed 97

I have 1 Master node and then worker nodes separated across regions. worker nodes has labels etc attached so that i can decide which service to run on which nodes. Now i want to expose services via domain name but ia m confused with nginx ingress working

  1. which ip i have to point to dmian name to .
  2. can i have multiple ingrsses? because if i have pod in region 1 then i want to ingess which is also in same region.
  3. Also ingress i want to have in separate nodes only for ingress as i dont want to expose ip of any nodes like master , worker. I only want to expose ip of ingress nodes
1 Answers

which ip i have to point to dmian name to .

Use external IP for ingress nginx and point it to domain. nginx ingress service will get deployed as service type load balancer.

can i have multiple ingrsses? because if i have pod in region 1 then i want to ingess which is also in same region.

Yes you can multiple ingress backed by single ingress controller nginx, or else you can multiple ingress controller also as per required you can configure.

Also ingress i want to have in separate nodes only for ingress as i dont want to expose ip of any nodes like master , worker. I only want to expose ip of ingress nodes

Instead of exposing that i would suggesting using the load balancer and use that IP, however you can K8s nodeselector field to place ingress controller on specific node and it will work fine. If node fails or goes down your whole app will be down as Nginx ingress controller will be also down so do take care.

Related