Verify Kernel Isolation Between Kata Containers and runc Using RuntimeClass
This challenge is temporarily unavailable
We've disabled nested virtualization following a series of serious security vulnerabilities in KVM and the Linux kernel. This challenge depends on it, so it will be available again once we can safely turn nested virtualization back on.
Scenario
The cluster has two Kata runtimes available via RuntimeClass:
kata-clh— uses Cloud Hypervisor as the VMMkata-qemu— uses QEMU as the VMM
Your task is to deploy Pods using each runtime and prove kernel isolation by comparing the kernel version reported inside each Pod against the runc Pod kernel, saving each output to a file.
Task
Deploy three Pods in the default namespace:
nginx-runc— uses the defaultruncruntime.nginx-clh— usesruntimeClassName: kata-clhnginx-qemu— usesruntimeClassName: kata-qemu
All three Pods should use the image nginx:stable.
After all Pods are Running, run uname -a inside each Pod and save each output to the following paths:
| Source | Output File |
|---|---|
nginx-runc | /home/laborant/nginx-runc/runc-pod.txt |
nginx-clh | /home/laborant/nginx-clh/clh-pod.txt |
nginx-qemu | /home/laborant/nginx-qemu/qemu-pod.txt |
Verify that:
- The
nginx-clhandnginx-qemuPods report a different kernel version fromnginx-runc— this is the guest VM kernel bundled with Kata Containers - The
nginx-clhandnginx-qemuPods report the same guest kernel version as each other
Hint
A RuntimeClass is a cluster-scoped resource that maps a name to a container runtime handler. Check the available RuntimeClasses before creating Pods:
kubectl get runtimeclass
Reference a RuntimeClass in a Pod spec using the runtimeClassName field:
spec:
runtimeClassName: kata-clh
If runtimeClassName is omitted, the cluster default runtime (runc) is used.
See the official docs: Runtime Class