Module 3 · Containers & Kubernetes
Isolation reality
17 / 38

A container is not a lightweight VM.

A container shares the host's kernel — isolated by namespaces, cgroups, and seccomp, not a hypervisor — genuinely weaker than VM isolation.

Virtual machine

Hardware isolation

A full separate kernel, hypervisor-level separation. A VM escape is rare and high-severity.

Container

Kernel sharing

Namespaces (a private view), cgroups (resource limits), seccomp (restricted syscalls) — weaker isolation.

Distroless — the aggressive option

No shell, no package manager, no OS utilities at all. If compromised, an attacker can't even run ls.

Tradeoff: no docker exec shell debugging — compensate with better external logs/traces.

Why this matters practically

A serious kernel vulnerability can theoretically let a container affect the host or other containers — exactly why non-root, minimal images, and Pod Security Standards (next) all matter as layered defenses.

Container isolation being weaker than a VM's is a fact to design around — every hardening step here compensates for it, not eliminates it.