This challenge checks that you can, on your own, ship an application in two variants with Kustomize, add a CronJob and a Job to it, then repair a failing Pod whose cause you record first. It is meant for people who have just followed the nine lessons listed below. It runs in a dsoxlab virtual machine, on a kind cluster named lab with Kubernetes 1.37, and takes about 60 minutes. It gives no hints and teaches nothing new: it checks what the lessons have already let you practice.
What you will learn
The lab reads the ~/expedition/ folder and the objects of the cluster, then compares the two. It checks that you can:
- Write a single Kustomize base and two overlays, dev and prod, that differ only by three settings.
- Reference the application image by its digest and get three available replicas.
- Prepare a Pod with an init container, then relay the access log of the server with a native sidecar and a shared volume.
- Declare requests and limits for each container, and three probes on the right port.
- Schedule a CronJob and run a Job to completion.
- Compare a folder with the cluster and find no difference.
- Record the cause of a failure before any repair, then repair the Pod without recreating it.
What should you be able to do before you start?
No step-by-step guide goes with the challenge, and choosing the right tools is part of what it checks. Everything it asks is taught in nine lessons:
- Debug a Kubernetes application: read the cause of a failure in the events and repair a Pod without recreating it. Its two guided labs,
ckad-troubleshoot-missing-configmapandcka-kubectl-debug, let you practice this diagnosis; - Init containers and sidecars: prepare a Pod with an init container and accompany it with a native sidecar;
- Kubernetes application volumes: share a volume between the server and the sidecar;
- Kubernetes requests and limits: declare the resources of each container;
- Kubernetes probes: set startup, liveness and readiness probes;
- Kubernetes Jobs and CronJobs: schedule a CronJob and run a Job to completion;
- Manage container images in Kubernetes: reference an image by its digest;
- Kustomize: write a base and two overlays;
- kubectl diff and wait: compare a folder with the cluster and wait until an object is ready.
If one of these points feels unclear, reread the lesson before you start.
What does the statement ask for?
On the kind cluster lab, which your kubectl already targets, the shipping team hands you its colis application, a web server, to ship in the expedition namespace in two variants, dev and prod. At the same time, the etiquettes Pod of that namespace no longer starts. The ~/expedition/ directory is empty. The application uses the image nginx:1.30.5@sha256:9bf97bd7714f5e24c1ccd545ecb9eb5435cb6d109c97cebb15e7e455e0239edb, and the tooling the image busybox:1.38.0@sha256:a46257e06c82ad85242d0d38077d0a52d9896389ca60a1a59d3463db586e5fa4.
The requirements say what must be true at the end, never how to get there:
- A single Kustomize base is in
~/expedition/base/, with two overlays,~/expedition/overlays/dev/and~/expedition/overlays/prod/. They differ only by the number of replicas (1 in dev, 3 in prod), the name prefix (dev-,prod-) and theenvlabel (dev,prod). Both variants live inexpedition: the prod Deployment is therefore namedprod-colis. prod-colishas its 3 replicas available, on the application image referenced by digest. This requirement is blocking.- Each Pod of the application carries an init container that prepares the home page and ends before the server starts, and a native sidecar whose logs repeat, line by line, the accesses that the server writes on a shared volume. The server writes its accesses to
/var/log/nginx/access.log. - Each container declares its requests and its limits, and the memory limit of the server is
128Mi. - The startup, liveness and readiness probes query the server over HTTP on its port 80, and each Pod is Ready with no restart. This requirement is blocking.
- A
purge-colisCronJob runs every day at 3:00, keeps two successful Jobs and one failed, and never runs two purges at the same time. - An
inventaireJob is complete with three completions. The CronJob and the Job are not part of the variants: you apply them separately, under these exact names. - The cluster matches the folder: comparing each overlay with the cluster finds no difference.
- Before any repair, you write in
~/expedition/cause.txtwhyetiquettesdoes not start: what it looks for without finding it, by its name, and that it is missing. After that, you do not touch the file again. This requirement is blocking. etiquettesruns again, without having been recreated. It expects the valueFORMAT=A6.
How do you start the challenge and get graded?
The lab prepares the cluster and the namespace, then reads the state of the cluster and of your files when you ask for your grade. You start it with dsoxlab run k8s-challenge-manifest-robuste. Two commands are then used: dsoxlab check k8s-challenge-manifest-robuste tells you where you stand, requirement by requirement, as many times as you like, and dsoxlab submit k8s-challenge-manifest-robuste returns the final result. The grade never looks at the commands you typed: it reads the final state of the cluster and of your files.
Put it into practice
This lab is the challenge itself. It puts you in front of the situation described above and it is validated on the state of the cluster and of the folder, as a colleague taking over your work would do.
How is the challenge graded?
The pass mark is 70 out of 100. The ten requirements weigh the same, 10 points each: seven requirements met out of ten just reach the pass mark. Requirements 2, 5 and 9 are blocking: if one of the three is not met, the challenge fails, whatever the total.
If a requirement resists, reread the lesson that teaches it, in the list of the prerequisites section, then run dsoxlab check again.
Key points
- The challenge is a final exercise to do alone and without hints: it explains nothing and grades the final state of the cluster and of your files, not your commands.
- Requirements 2, 5 and 9 are blocking:
prod-colisavailable on its digest, the probes with Pods Ready and no restart, and the cause recorded before the repair. - The cause of the failure is written in
~/expedition/cause.txtbefore any repair, and theetiquettesPod is repaired without being recreated. dsoxlab checkshows where you stand as often as you like;dsoxlab submitreturns the result.