Ensure SecurityContext Field Is Set

Ensure to configure a security context for a Pod or Container. The security context defines a pod or container's privileges and access control settings.

Risk Level: high
Cloud Entity: Kubernetes
Spectral Rule ID: K8S258

REMEDIATION

in spec set securityContext

spec:
+ securityContext:

References:

Pods

Pods are the smallest deployable units of computing that can be created and managed in Kubernetes.A Pod is a group of one or more containers (such as Docker containers), with shared storage/network, and a specification for how to run the containers.