concept
Security context and runtime controls
Security context describes constraints for a Pod or individual container. A Pod-level identity can supply defaults, while a container-level value can override applicable defaults. Some settings, such as a read-only root filesystem, belong to the container. A configuration that passes admission can still fail to start when the image or runtime cannot satisfy it.
Formal Syntax & Structure
kubernetes syntaxkubernetes
spec.containers[*].securityContextWorking Example
Example Snippetkubernetes
allowPrivilegeEscalation: falsereadOnlyRootFilesystem: truecapabilities: drop: - ALL