Skip to content
Français
Account: not signed in, sync available My learning
Select theme
Français

Level 2 exam: deploy an application

By updated

Improve this page

This exam measures whether you can, on your own, deploy a small complete application: a web storefront, a database whose data survives the loss of a Pod, a scheduled backup, an agent present on every node and a custom resource. It is meant for people who are finishing level 2. It runs in a virtual machine, on a kind cluster with Kubernetes 1.37, so plan about 90 minutes, and you pass it by meeting the five critical criteria of the grid, with at least 70 points. It teaches nothing new: it checks what the lessons have taught.

What you will learn

  • Say what the exam expects and which state of the cluster, the directory and the volumes it grades.
  • Spot the level 2 lessons to review before you start.
  • Work out what you must pass: the five critical criteria, and enough others to reach 70 points.
  • Read your result to decide whether to move on to level 3 or to consolidate.

What should you be able to do before you start?

No step-by-step guide goes with the exam, and choosing the right resources is part of what it measures. Everything it asks is taught in the three level 2 modules: Deploy your applications, Persistent storage and Advanced workloads. If a step feels unclear, reread those modules before you start.

What does the specification ask for?

The scenario describes a shop, in the magasin namespace of a kind cluster with one control plane and two workers. It says what must be true at the end, never how to get there: you choose the resources and the commands. The images of the storefront and of the rest are given, referenced by digest. The lab scenario also gives the names and paths that the grader looks for (vitrine, catalogue, /data, ~/boutique/base/, ~/boutique/overlays/prod/, port 80, the archives claim, a file whose name starts with sauvegarde): it is authoritative, so read it before you name anything.

  • The storefront runs with three interchangeable replicas. Its description lives in a Kustomize base, and it is shipped by a production overlay: the cluster must match that overlay exactly. In the cluster it is named exactly vitrine, with no prefix or suffix, even when shipped by the overlay.
  • Every container of the storefront, init container and sidecar included, declares its requests and limits, and the server is probed at startup, for liveness and for readiness. An init container writes the home page and finishes before the server starts. A sidecar picks up, line by line, the access entries that the server writes to /var/log/nginx/access.log, through a shared volume. The sidecar is ready before the server and stays active next to it for the whole life of the Pod, so that no line is lost. No Pod in the magasin namespace restarts, not only those of the storefront.
  • The catalogue database runs with two replicas that have a stable identity, each with its own volume, created on demand by a storage class that keeps it when its claim disappears. The grader will write a piece of data to the first replica, delete its Pod and read the data back.
  • A backup, the scheduled job sauvegarde, runs every day at 2:30 and writes a file to a persistent volume. You launch it once by hand, from its schedule, and you let it finish.
  • An agent, named exactly collecteur in the cluster, runs on every node, control plane included, without the control plane losing its taint.
  • The Sauvegarde custom resource, whose definition is already installed, receives an object nocturne, with source catalogue, kept for 14 days, and nothing more in its spec. The API must still reject a retention outside the bounds of the schema.

How do you start the exam and get graded?

The lab prepares the cluster and the full statement, then reads the state of the cluster again when you ask for your grade. You start it with dsoxlab run k8s-epreuve-deployer-une-application. Two commands are then used, and they do not do the same thing. dsoxlab check k8s-epreuve-deployer-une-application tells you where you stand, criterion by criterion, as many times as you like, but each check acts on the cluster: it writes a piece of data to catalogue-0, deletes that Pod and waits for it to come back, and sends a request to the storefront. dsoxlab submit k8s-epreuve-deployer-une-application returns the verdict of the exam. The grade never looks at the commands you typed: it reads the state of the cluster, the ~/boutique/ directory and the volumes at the moment you ask for it.

Put it into practice

This lab is the exam itself. It puts you in front of the scenario described above and it is validated on the final state: the grader queries the cluster, reads the ~/boutique/ directory and checks the volumes, as a colleague taking over your work would.

How is the exam graded?

Ten criteria make up the grade, P01 to P10, at equal weight: each is worth 10 points out of 100. The pass threshold is 70 points, and five criteria are critical: they must all pass, whatever the total. A submission can therefore total 80 points and fail, because one critical criterion is not met.

The five critical criteria are worth 50 points: you must therefore pass at least two others to reach 70. The exam offers no hints, because it measures what you can do on your own, and it is graded the way it is taken.

CriterionCritical
P01the storefront is shipped from a Kustomize base and overlay, with no drift from the clusteryes
P02the storefront has all its replicas available on the image pinned by digest, and no Pod in the magasin namespace has restartedyes
P03every container of the storefront, init container and sidecar included, has a resource budget, and the three probes are on its portno
P04an init container finishes, and a sidecar that is ready before the server and active next to it for the whole life of the Pod relays the lines of the shared volumeno
P05the database has a stable identity, its replicas are created in order and all ready, each with its reserved volumeyes
P06a piece of data written by the grader survives the deletion of its Podyes
P07the database volumes are created on demand by the storage class, and kept when their claim disappearsyes
P08the backup is scheduled, and a manual run finished by writing to its volumeno
P09the agent runs on every node, control plane included, taint keptno
P10the requested custom resource exists with its values, and an out-of-bounds value is rejectedno

What should you do after the exam?

If all the critical criteria pass and the grade reaches 70, level 2 is validated. Otherwise, reread the lesson that teaches the failed criterion, then retake the exam:

Key points

  • The exam is a measurement: it explains nothing again, gives no hints and grades the final state of the cluster, the ~/boutique/ directory and the volumes.
  • You need the five critical criteria and at least 70 points, so at least two non-critical criteria on top.
  • The lab scenario is authoritative for names and paths: read it before you name anything.
  • Each dsoxlab check acts on the cluster: it deletes the catalogue-0 Pod to check that the data survives.