Skip to content
Français
Sync not enabled: your progress stays in this browser My learning
Select theme
Français

Ship a robust manifest from a set of requirements

By updated

Improve this page

Logo Kubernetes

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:

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:

  1. 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 the env label (dev, prod). Both variants live in expedition: the prod Deployment is therefore named prod-colis.
  2. prod-colis has its 3 replicas available, on the application image referenced by digest. This requirement is blocking.
  3. 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.
  4. Each container declares its requests and its limits, and the memory limit of the server is 128Mi.
  5. 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.
  6. A purge-colis CronJob runs every day at 3:00, keeps two successful Jobs and one failed, and never runs two purges at the same time.
  7. An inventaire Job is complete with three completions. The CronJob and the Job are not part of the variants: you apply them separately, under these exact names.
  8. The cluster matches the folder: comparing each overlay with the cluster finds no difference.
  9. Before any repair, you write in ~/expedition/cause.txt why etiquettes does 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.
  10. etiquettes runs again, without having been recreated. It expects the value FORMAT=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-colis available 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.txt before any repair, and the etiquettes Pod is repaired without being recreated.
  • dsoxlab check shows where you stand as often as you like; dsoxlab submit returns the result.