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
This section is not available anymore. Please use the main Exam Page.CKA Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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 2 years, 2 months agoLilyNaMeli
2 years agokarsstars
Highly Voted 2 years, 5 months agodhereish
1 year, 11 months agonoahsark
Most Recent 6 months, 2 weeks agonoahsark
6 months, 2 weeks agokubebaba
1 year, 2 months agoyeshu007
1 year, 2 months agofc146fc
1 year, 3 months ago[Removed]
1 year, 7 months agoShenannigan
1 year, 8 months agoyeshu007
1 year, 2 months agoiiiaz
1 year, 9 months agoreal111
1 year, 9 months agoiiiaz
1 year, 10 months agoNurbol
1 year, 10 months agoPratham123
1 year, 10 months agokopper2019
2 years agoNicky88
2 years, 1 month agoNicky88
2 years, 1 month agoTradeLabelSoftware
2 years, 3 months agomellohello
1 year, 11 months agoBarcodeMaker
2 years, 3 months ago