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

Level 6 exam: expose and protect a service on Cilium

By updated

Improve this page

Logo Kubernetes

This exam measures whether you can, on your own, expose and protect a service on a Cilium cluster: serve a shop's storefront over HTTPS through a Gateway, let clients read it without letting them modify it, cut off an unwanted client, encrypt traffic between nodes and find in Hubble the request that your protection refuses. It is meant for people who are finishing level 6, "Advanced networking". It runs in a virtual machine, so plan about 120 minutes. You pass it by meeting two critical criteria and reaching at least 70 points out of 100. It offers no hints and teaches nothing new: it checks what the lessons have taught.

What you will learn

The grader reads the state of the Cilium cluster and checks that you can:

  • Serve a storefront over HTTPS through a Cilium Gateway, with an address and the certificate intended for its host name.
  • Route by host name, so that another name gets a 404 error.
  • Let clients read (GET) and refuse writes (POST, 403 error) through the Gateway, with a rule that looks at the HTTP method and path.
  • Cut off an unwanted client at the network level without blocking the legitimate client.
  • Encrypt traffic between nodes with WireGuard.
  • Find in Hubble the request that your protection refuses, and record it in a ConfigMap.

What should you be able to do before you start?

No step-by-step guide goes with the exam, and choosing the right objects is part of what it measures. The specification describes results, not how to get them. It assumes the kubeadm cluster of level 4 and the basic resources of levels 1 to 3, and it relies on seven lessons.

Keep in mind that the protection must not break the legitimate reading of the storefront: a policy that also cuts the Gateway's traffic or that of caisse is worthless.

What does the specification ask for?

The scenario has you take over the Cilium cluster of a shop that is moving its storefront. It works, and nobody has touched it since the installation: no Gateway, no network policy, no encryption, and no load balancer. The specification says what must be true at the end, never how to get there. The lab scenario gives the names that the grader looks for: it is authoritative, so read it in full when you start.

You work on the node net-cp.lab, with kubectl and helm. The cluster has three nodes, net-cp.lab, net-w1.lab and net-w2.lab, and Cilium 1.20.5 replaces kube-proxy there. Two facts are given to you: the version of Gateway API that this version of Cilium supports is v1.6.3, and the network team entrusts you with the address block 172.31.0.0/28 for the exposed services.

The inherited state lives in the boutique namespace.

  • The vitrine answers over HTTP behind a Service of the same name, on port 80.
  • caisse is its legitimate client.
  • publicite, an advertising tracker, also reaches it and has no business there.
  • relance, a reminder robot, carries the same labels as caisse and calls the vitrine in a loop. Besides reading it, it sends a request that a read-only storefront must refuse. Which one, nobody remembers.
  • The certificate for vitrine.formation.test is ready in the Secret vitrine-tls, signed by an authority specific to the shop and published in the ConfigMap ca-boutique.

The specification comes down to seven requirements, each graded by one criterion.

  • A Gateway served by Cilium, in boutique, is ready and has an address.
  • Its HTTPS listener presents the certificate from vitrine-tls for vitrine.formation.test, and that certificate verifies against the shop's CA.
  • https://vitrine.formation.test/ leads to the vitrine through the Gateway, and any other name gets a 404 error.
  • Through the Gateway, the vitrine can be read (GET) and an attempt to write (POST) is refused with a 403.
  • caisse reads without writing, and publicite no longer reaches the vitrine at all, cut off at the network level.
  • Each Cilium agent encrypts with WireGuard toward its two peers.
  • The ConfigMap diagnostic in boutique names the request that your protection refuses to relance: the key methode holds the HTTP method and the key chemin holds the path.

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-reseau-avance. Two commands are then used, and they do not do the same thing: dsoxlab check k8s-epreuve-reseau-avance tells you where you stand, criterion by criterion, as many times as you like; dsoxlab submit k8s-epreuve-reseau-avance returns the verdict. The grade never looks at the commands you typed, only at the final state.

The grader queries the cluster, never your manifests. It reads the state of the Gateway, opens a real TLS connection to examine the certificate presented, sends real GET and POST requests through the Gateway and from the client Pods, queries the encryption status in each Cilium agent and reads the ConfigMap diagnostic again to compare it with the request that relance actually sends.

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 of the cluster, as a colleague taking over your work would.

How is the exam graded?

Seven criteria make up the grade, at equal weight: each is worth about 14.3 points out of 100. The pass mark is 70 points, that is at least five criteria. Two criteria are critical: they must both pass, and failing a single one fails the exam, whatever the total. The two critical criteria are worth about 28.6 points: you must therefore pass them, then at least three of the other five to reach 70, that is five criteria in all (71.4 points). With four criteria, the total falls to 57.1 points, which is not enough.

The exam offers no hints, because it measures what you can do on your own, like the level 3 exam. If a criterion resists, the section that follows says which lesson to reread before you retake it.

The table gives each criterion, phrased as a result, and says whether it is critical.

CriterionCritical
E1a Gateway served by Cilium in the shop's namespace is programmed and has an addressno
E2its HTTPS listener presents the certificate planned for the storefront's name, verified against the shop's CAno
E3the storefront's name leads to the storefront through the Gateway, and any other name gets a 404no
E4through the Gateway, GET is served and POST is refused with a 403yes
E5caisse reads without writing, and publicite is cut off at the network levelno
E6each Cilium agent encrypts with WireGuard toward its two peersyes
E7the ConfigMap diagnostic names the method and the path that the policy refuses to relanceno

What should you do after the exam?

If the two critical criteria pass and the total reaches 70, the level 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 and grades the state of the cluster, not your manifests or your commands.
  • The two critical criteria, read-only access through the Gateway and WireGuard encryption, decide the verdict: failing one fails the exam, and the total must also reach 70 points.
  • Each criterion is worth about 14.3 points: five criteria are enough to reach 70 points (71.4), four are not (57.1).
  • The exam offers no hints: it measures what you can do on your own.
  • dsoxlab check tells you where you stand at will, and only dsoxlab submit returns the verdict.