Hi
In Question 8 of Part 2 of the Ingress Networking Practice Test, we were required to build an ingress resource to make the applications available at /wear and /watch. I managed to do everything except for the rewriting. I do not know why I would need to at first, but I did figure out why after looking at the answer.
This was the part missing
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/ssl-redirect: “false”
I was wondering how can I debug ingress to find out why that it wasn’t working in the first place?
A quick google around mentions that you can look at the logs as it should be a pod. I can’t find a listing as a pod.
Any ideas?
Ayman
May 6, 2021, 11:59am
#2
Hello @lielarster
In this question, you can remove those 2 annotations and it will work fine as well.
the yaml file could be as followed
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress-wear-watch
namespace: app-space
spec:
rules:
http:
paths:
path: /wear
backend:
serviceName: wear-service
servicePort: 8080
path: /watch
backend:
serviceName: video-service
servicePort: 8080
Is there a way to check the logs? What logs can I look at?
Ayman
May 7, 2021, 9:13pm
#4
You can use describe command
$ kubectl describe ing ingress-resource-name -n namespace-of-ingress-resource
1 Like
Ayman
March 30, 2022, 5:03pm
#6
Hello @aashu4uiit ,
Thanks for sharing!