Task - Create a new nginx Ingress resource as follows: ✑ Name: pong ✑ Namespace: ing-internal ✑ Exposing service hello on path /hello using service port 5678
I have seen several commands listed here but it states it is for nginx so you need to add the nginx annotation like so:
k create ing pong -n ing-internal --rule="/hello=hello:5678" --annotation="nginx.ingress.kubernetes.io/rewrite-target=/"
Also the debate of pathType:
I think the pathType should be exact because the path given is /hello and not /hello*
If you disagree and feel that pathType should be Prefix then your command would look like this:
k create ing pong -n ing-internal --rule="/hello*=hello:5678" --annotation="nginx.ingress.kubernetes.io/rewrite-target=/"
From other forums I can see some people struggled with this question though it seems very simple. The first thing I would check is to search for the existence of a ingress-controller pod and ingress-controller service. The ingress-controller is mandatory for a ingress to work.
I wonder what is the catch with this (easy) question?
How to troubleshoot in case kubectl get ing does not show the ADDRESS?
Like in this example:
NAME CLASS HOSTS ADDRESS PORTS AGE
test-ingress external-lb * 203.0.113.123 80 59s
How the Ingress IngressClass is added? Is it needed to add IngressClass? The question does not mention IngressClass name. https://kubernetes.io/docs/concepts/services-networking/ingress/#default-ingress-class
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
dirkdirkdirk
Highly Voted 1 year, 10 months agoLilyNaMeli
1 year, 8 months agokarsstars
Highly Voted 2 years agodhereish
1 year, 7 months agonoahsark
Most Recent 1 month, 3 weeks agonoahsark
1 month, 3 weeks agokubebaba
10 months, 1 week agoyeshu007
9 months, 2 weeks agofc146fc
10 months, 2 weeks ago[Removed]
1 year, 3 months agoShenannigan
1 year, 4 months agoyeshu007
9 months, 2 weeks agoiiiaz
1 year, 5 months agoreal111
1 year, 5 months agoiiiaz
1 year, 5 months agoNurbol
1 year, 5 months agoPratham123
1 year, 5 months agokopper2019
1 year, 7 months agoNicky88
1 year, 9 months agoNicky88
1 year, 9 months agoTradeLabelSoftware
1 year, 10 months agomellohello
1 year, 6 months agoBarcodeMaker
1 year, 10 months ago