Linux Capabilities
Cheat sheet · https://pcornel.dk/topic.php?topic=5041
Answer
Linux capabilities split root's powers into units like NET_ADMIN or SYS_ADMIN. Containers should drop all capabilities and add back only what they need, and never run privileged.
Remember
- Capabilities split root into units like NET_ADMIN.
- Drop ALL and add back only what is needed.
- Never run --privileged in production.
First checks
docker inspect <c> --format '{{.HostConfig.CapAdd}} {{.HostConfig.CapDrop}}'— capabilitieskubectl get pod <p> -o jsonpath='{..securityContext.capabilities}'— pod capscapsh --decode=<hex>— decode CapEff
Verify in this order
container → capability set → kernel operations
Where it usually breaks
First mismatch in platform/workload identity → desired configuration → management/control plane → runtime enforcement → telemetry → workload/resource outcome; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5041