CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Security Specialist

Sandboxed Containers with gVisor and RuntimeClass

The previous guide ended with two tenants sharing one kernel. This one gives a Pod a kernel of its own - four lines of RuntimeClass, one line in the Pod spec, and a proof that fits on a single line of output.

Microservice Vulnerabilities Guide 23 of 40 Advanced

containerd on these nodes already has a runsc handler configured. Kubernetes cannot use it until a RuntimeClass names it, which is the entire integration.

The cka6001 cluster: one control plane and 2 schedulable workers, on Cilium.
Server NameIP AddressOSRolesCPURAMHDD
CKA6001192.168.0.46Ubuntu 26.04 LTSControl Plane Node (tainted NoSchedule)2 Core4 GB50 GB
CKA6001-NODE01192.168.0.47Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA6001-NODE02192.168.0.48Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

This guide includes

Use this when two tenants must not share a kernel. This matters because ordinary containers do share one - and a RuntimeClass is four lines that changes which kernel a Pod actually gets.

Before you start

  1. What the runtime can already do

  2. Name it, and use it

  3. The proof, which is the kernel itself

  4. The contrast, and what it is not

Official sources