Kubernetes Security for DevSecOpss
Kubernetes security is hardening the cluster and workloads running on it. It includes RBAC with least-privilege roles, Pod Security Standards, network policies that limit traffic between pods, secret handling, admission controllers that enforce policy, and protecting the API server, nodes and etcd. Defaults are permissive, so deliberate configuration is needed.
Stage: Cloud, Containers and Runtime · Part of the DevSecOps roadmap · Last reviewed 19 November 2026
What to learn in Kubernetes Security
- Write an RBAC Role and RoleBinding with minimal permissions
- Apply Pod Security Standards at the baseline or restricted level
- Create a default-deny NetworkPolicy and allow required traffic
- Enforce policies with Kyverno or OPA Gatekeeper admission control
- Protect secrets with encryption at rest or an external store
- Audit a cluster against the CIS Kubernetes benchmark
Kubernetes Security interview questions
Why add a default-deny NetworkPolicy?
By default every pod can talk to every other pod. A default-deny policy blocks all traffic in a namespace, and you then allow only needed flows. It limits lateral movement if one workload is compromised.
Are Kubernetes Secrets encrypted by default?
Not necessarily. Secrets are base64 encoded, not encrypted, and are stored in etcd, which may be unencrypted unless encryption at rest is enabled. Use encryption providers or an external secrets manager, and restrict RBAC access to them.
Where Kubernetes Security fits in the DevSecOps roadmap
Kubernetes Security belongs to the Cloud, Containers and Runtime stage (intermediate level), which takes about 6 hours. Harden where it runs.
Other units in this stage
Back to the full DevSecOps roadmap