CKAD lighning lab # 2 Question 4 & general ques

(1) General ques - How does the rigor/level of lightning labs compare to that of the actual CKAD exam? Lightning labs contains some questions which aren’t covered in the lectures. Examples: setting activedeadlineseconds in cronjob, creating emptyDir: { } in volume, etc there are 3-4 other cases like these. I went back to the lecs, these are not covered. Are these (outside of lectures) kinds of questions to be expected on the actual CKAD exam too? !!

(2) Based on this question, how to decipher that we MUST rewrite target else autograder calls it incorrect:
nginx.ingress.kubernetes.io/rewrite-target: / ?

Comparing my ingress yaml with provided solution yaml, I wrote had everything correct except the annotation. But nowhere the question says to annotate, so how can we magically come to know when to do that and when not to do that without looking INSIDE the applications to check routes Kindly clarify as i am sure the actual CKAD will have ingress question and i don’t want to get those wrong! Thanks

It turns out there is one place in the K8s docs that answers your question: Set up Ingress on Minikube with the NGINX Ingress Controller. It shows that one annotation. So technically, the exam could ask about that annotation. I don’t think they would, since that’s not really fair, and because the real source for this info is the github repo for ingress-nginx – which is not an allowed resource.

If the grader is requiring that information, then you now know where to find it. But I don’t think you’d get a comparable question in the exam that would require knowledge of ingress-nginx annotations.

Thanks Rob. In Lecture 116, Let me share 2 questions where hint/instruction was provided. So i was expecting something like this… But the lightning lab question doesn’t provide hint/instruction like this …

I’ve added your request to our lab team queue.

While I basically agree with you, you can discover in this question that an annotation is needed, since the ingress actually does not work w/o this annotation – trying to curl the path will give you a 404 error:

controlplane ~ ➜  curl http://apparels.ecom-store.com:30093/wear
<!doctype html>
<title>Hello from Flask</title>
<body style="background: #2980b9;">

<div style="color: #e4e4e4;
    text-align:  center;
    height: 90px;
    vertical-align:  middle;">
    <img src="https://res.cloudinary.com/cloudusthad/image/upload/v1547053817/error_404.png">

</div>

</body>

The annotation fixes this:

controlplane ~ ➜  curl http://apparels.ecom-store.com:30093/wear
<!doctype html>
<title>Hello from Flask</title>
<body style="background: #2980b9;">

<div style="color: #e4e4e4;
    text-align:  center;
    height: 90px;
    vertical-align:  middle;">
    <img src="https://res.cloudinary.com/cloudusthad/image/upload/v1547052428/apparels.jpg">

</div>

</body>
1 Like

Thanks for that useful tip! i didn’t check it like that…that’ll be very useful for checking - yes, it does indicate that without annotation it doesn’t work…! so gotta add annotation… :+1: