In KK lab <https://kodekloud.com/topic/ingress-networking-2/> Question 8: have d . . .

VishalT:
In KK lab https://kodekloud.com/topic/ingress-networking-2/
Question 8: have deployed ingress with command
k create ingress newing --rule=/watch=video-service:8080
–rule=/wear*=wear-service:8080

Answer: let me proceed to question 9 and on question 9 when open link given above terminal by adding /wear or /watch it returns error “too many rewrites” on browser.

What could be the issue ? I have added annotation to rewrite the target according to nginx-ingresscontroller

Mohamed Ayman:
Hello @VishalT
Try to add
<http://nginx.ingress.kubernetes.io/ssl-redirect|nginx.ingress.kubernetes.io/ssl-redirect>: "false" in Ingress’ annotations

Sanjeevkumar:
Hi @Mohamed Ayman - bit hard to find <http://nginx.ingress.kubernetes.io/ssl-redirect|nginx.ingress.kubernetes.io/ssl-redirect>: in k8s doc as well. Kindly point me to this in doc,

Sanjeevkumar:
https://kubernetes.io/docs/concepts/services-networking/ingress/
rewrite-target can be found above but not finding ssl-redirect.

R:
Recommend to watch the solution video and understand how to troubleshoot the issue as well.

Mohamed Ayman:
Hello @Sanjeevkumar
NOTE: By default the controller redirects (301) to HTTPS if TLS is enabled for that Ingress. If you want to disable that behavior, you can use the <http://nginx.ingress.kubernetes.io/ssl-redirect|nginx.ingress.kubernetes.io/ssl-redirect>: "false" annotation.
And in the lab, we manage the HTTPS from our side, not from the ingress. So, you should add annotation <http://nginx.ingress.kubernetes.io/ssl-redirect|nginx.ingress.kubernetes.io/ssl-redirect>: "false"
for more info check this https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#server-side-https-enforcement-through-redirect

Sanjeevkumar:
i have watched and understood. But the question is its hard to remember the words “ssl-redirect” and “rewrite-target” . we can remember like something “ssl” and “rewrite” so i want to search in k8s document during exam rather.