exam questions

Exam CKA All Questions

View all questions & answers for the CKA exam

Exam CKA topic 1 question 17 discussion

Actual exam question from CNCF's CKA
Question #: 17
Topic #: 1
[All CKA Questions]

SIMULATION -


Task -
Create a new nginx Ingress resource as follows:
✑ Name: pong
✑ Namespace: ing-internal
✑ Exposing service hello on path /hello using service port 5678

Show Suggested Answer Hide Answer
Suggested Answer:



Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
dirkdirkdirk
Highly Voted 1 year, 10 months ago
k create ing pong -n ing-internal --rule="/hello=hello:5678"
upvoted 11 times
LilyNaMeli
1 year, 8 months ago
I think should be: k create ing pong -n ing-internal --rule="/hello/*=hello:5678" for pathType: Prefix , otherwise you got pathType: Exact
upvoted 13 times
...
...
karsstars
Highly Voted 2 years ago
why there is only 17 Qs and not 20?
upvoted 11 times
dhereish
1 year, 7 months ago
I think the exam has only 17 questions
upvoted 2 times
...
...
noahsark
Most Recent 1 month, 3 weeks ago
killer_sh_lab part2: k get svc -A curl -kL <INTERNAL_IP>/hello # CLUSTER-IP of LoadBalancer -k, --insecure -L, --location
upvoted 1 times
...
noahsark
1 month, 3 weeks ago
killer_sh_lab part: k create ns ing-internal k run nginx -n=ing-internal --image=nginx --port=80 k expose po nginx -n=ing-internal --name=hello --port=5678 --target-port=80 k get ingressclass vi pong.yml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: pong namespace: ing-internal annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: ingressClassName: nginx rules: - http: paths: - path: /hello pathType: Prefix backend: service: name: hello port: number: 5678 k apply -f pong.yml
upvoted 1 times
...
kubebaba
10 months, 1 week ago
I had the same questions But I did curl I didnt get any response, and after I changed port to 80, I got the correct response
upvoted 1 times
yeshu007
9 months, 2 weeks ago
can i know for what ip you did curl?
upvoted 2 times
...
...
fc146fc
10 months, 2 weeks ago
Create a ing-internal.yaml file apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ping namespace: ing-internal annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: rules: - http: paths: - path: /hi pathType: Prefix backend: service: name: hi port: number: 5678 kubectl create -f ing-internal.yaml
upvoted 3 times
...
[Removed]
1 year, 3 months ago
If you search for Ingress in kubernetes.io.docs you'll find almost the exact answer in the kb for the Ingress resource type.
upvoted 2 times
...
Shenannigan
1 year, 4 months ago
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=/"
upvoted 6 times
yeshu007
9 months, 2 weeks ago
for checking what did you do , can you explain the test
upvoted 1 times
...
...
iiiaz
1 year, 5 months ago
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?
upvoted 2 times
...
real111
1 year, 5 months ago
Do we need Prefix here? it says path /hello not /hello* ? eny ideas?
upvoted 2 times
...
iiiaz
1 year, 5 months ago
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
upvoted 1 times
...
Nurbol
1 year, 5 months ago
kind: Ingress metadata: name: pong namespace: ing-internal annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: rules: - http: paths: - path: /hello pathType: Prefix backend: service: name: hello port: number: 5678
upvoted 6 times
Pratham123
1 year, 5 months ago
hey just for confirmation, this same question comes in exam?
upvoted 2 times
...
...
kopper2019
1 year, 7 months ago
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: pong namespace: ing-internal annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: ingressClassName: nginx rules: - http: paths: - path: /hello pathType: Prefix backend: service: name: test port: number: 5678
upvoted 6 times
...
Nicky88
1 year, 9 months ago
is it necessary to create any service here? what type is the hello service?
upvoted 4 times
...
Nicky88
1 year, 9 months ago
is it necessary to create any service here? what type is the hello service?
upvoted 1 times
...
TradeLabelSoftware
1 year, 10 months ago
How can be check the availability of service wit another commands.
upvoted 1 times
mellohello
1 year, 6 months ago
k get ingress -n ing-internal or k describe ingress -n ing-internal
upvoted 1 times
...
...
BarcodeMaker
1 year, 10 months ago
Can we change the service port 5678.
upvoted 1 times
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago