Hello , Could some one please explain two queries 1. Ingress controller is depl . . .

I Malla:
hello , Could some one please explain two queries

  1. Ingress controller is deployed in pod and has a nodePort service exposed in namespace named “A”
    Suppose a ingress resource is created in another namespace “B” .
    So traffic comes from outside to service in A namespace then to the ingress rule in namespace B and then goes to another service mentioned in that ingress rule to finally reach the webserver-pod.
    Can someone provide some insight on it please?

  2. Also please help me understand Annotations and rewrite-target. I did not understand 216 numbered material from the course.

Mohamed Ayman:
2. If you need to control the ingress traffic redirection and the return code using a rewrite rule, then you need to use a return directive after the rewrite directive. More info here: https://www.nginx.com/blog/creating-nginx-rewrite-rules|https://www.nginx.com/blog/creating-nginx-rewrite-rules.

Mohamed Ayman:

  1. Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource.
  2. internet
    
  3.     |
    
  4. [ Ingress ]
  5. –|-----|-- [ Services ]

I Malla:
What about the namespace that the ingress controller is deployed in ? How would it work if the controller and rules are in different namespaces ?