1

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
Motaro
  • 13
  • 3
  • While Stack Overflow does permit certain questions about Kubernetes, we require that they (like all questions asked here) be specifically related to programming. This question does not appear to be specifically related to programming, but infrastructure- and networking-related, which makes it off-topic here. You might be able to ask questions like this one on [sf] or [DevOps](https://devops.stackexchange.com/). --- Please read: [Can I ask only one question per post?](https://meta.stackexchange.com/questions/222735/can-i-ask-only-one-question-per-post) – Turing85 Jul 17 '22 at 08:15

1 Answers1

0

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.

Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102
  • I am using VMs for nodes how can i use loadbalancer? – Motaro Jul 18 '22 at 13:28
  • you have to use VM only for Node however in front of VM you have to use LB so single lB will route all traffic and manage it. – Harsh Manvar Jul 18 '22 at 13:50
  • if you are on anycloud provider, if you are not you can check the metalLB if on local system or so, OR else you can use VM IP only as per your plan, however each time VM changes it's IP you have to update the DNS record. – Harsh Manvar Jul 18 '22 at 13:51