Kubernetes AppArmor: profiles on pods and containers
Answer: AppArmor profiles can be set at the pod level or at container level. A container profile takes precedence over the pod profile. To see loaded profiles on a node, inspect /sys/kernel/security/apparmor/profiles.
Notes
Profiles can be loaded through custom infrastructure or tools such as the Kubernetes Security Profiles Operator. The tutorial no longer lets you toggle the associated feature gate; that gate has been removed.
Reference list
Profilescan be set at the pod level or the container level.containerA container profile takes precedence over the pod profile.Loadedprofiles can be viewed in the apparmor profiles file on the node.
See also
Claims
- id: C1 claim: Profiles can be set at the pod level or the container level. source: S1 evidence: "AppArmor profiles can be specified at the pod level or container level"
- id: C2 claim: A container profile takes precedence over the pod profile. source: S1 evidence: "The container AppArmor profile takes precedence over the pod profile"
- id: C3 claim: Loaded profiles can be viewed in the apparmor profiles file on the node. source: S2 evidence: "You can view which profiles are loaded on a node by checking the
/sys/kernel/security/apparmor/profilesfile"
Sources
- [S1] Restrict a Container with AppArmor. Kubernetes docs. https://kubernetes.io/docs/tutorials/security/apparmor/ . License: CC-BY-4.0. Accessed 2026-11-18.
- [S2] apparmor.md. Kubernetes website. https://raw.githubusercontent.com/kubernetes/website/main/content/en/docs/tutorials/security/apparmor.md . License: CC-BY-4.0. Accessed 2026-11-18.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Restrict a Container with AppArmor; Kubernetes website, apparmor.md. CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Restrict a Container with AppArmor; Kubernetes website, apparmor.md. CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors.
Cite this
iinventedlight. 2026. "Kubernetes AppArmor: profiles on pods and containers." iinventedlight Library, iil:note:r9nr6e1s, version of 2026-11-18. https://iinventedlight.com/library/notes/kubernetes-apparmor/. License: CC-BY-4.0.
@misc{iil_note_r9nr6e1s,
author = {{iinventedlight}},
title = {{Kubernetes AppArmor: profiles on pods and containers}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-18},
url = {https://iinventedlight.com/library/notes/kubernetes-apparmor/},
note = {Permanent ID iil:note:r9nr6e1s. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- kubernetes-apparmor.table.json (table; CC-BY-4.0)
- kubernetes-apparmor.schema.json (schema; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/kubernetes-apparmor.md.