Kubernetes Security Hardening 2026
Kubernetes is the most widely used container orchestration platform — and one of the most complex attack targets. Misconfigured RBAC bindings, missing network policies and insecure images cost production clusters traffic, data and availability every day.
This pillar guide covers all core areas: RBAC, Network Policies, Pod Security, Secrets Management, Supply Chain and Compliance. With copy-paste examples and runbook links for every step.
TL;DR — Kubernetes Security Checklist
1. RBAC — Role-Based Access Control
RBAC is the foundation of any Kubernetes security setup. The goal: every service account and every user has exactly the permissions needed for their task — nothing more.
Common RBAC Mistakes
- • Granting cluster-admin to CI/CD pipelines or operators
- • Wildcard verbs (*) instead of explicit get/list/watch
- • Service accounts without role bindings — they inherit default permissions
- • No regular audits (kubectl auth can-i --list)
2. Network Policies — Default-Deny First
Without network policies, every pod can communicate with every other pod in the cluster. Set default-deny rules as a baseline, then add explicit allow rules.
3. Pod Security Admission (PSA)
PodSecurityPolicy was removed in K8s 1.25. The replacement is Pod Security Admission — namespace-level labels control the allowed security contexts.
privileged
No restrictions — ONLY for system namespaces
baseline
Blocks known privilege escalations
restricted
Maximum restriction — target for all production workloads
4. Secrets Management
Kubernetes Secrets are base64-encoded by default — not encrypted. Three protection layers are needed: encryption at rest, external secrets store and no secrets in Git.
5. Supply Chain Security
Compromised images are one of the most common attack vectors. Only images from verified sources should enter the cluster.
Image Signing with Cosign
cosign sign --key cosign.key my-image:tag after every build. Admission webhook verifies signature before deploy.
Vulnerability Scanning with Trivy
trivy image --exit-code 1 --severity HIGH,CRITICAL my-image:tag in the CI pipeline. Block deploy on findings.
SBOM Generation
syft my-image:tag -o spdx-json > sbom.json — full dependency list for compliance and audit.
Admission Webhook (Kyverno)
ClusterPolicy that only accepts signed images from allowed registries. Unsigned = blocked.
6. Runtime Protection
Static scans and admission checks catch configuration errors. Runtime security detects attacks at runtime — privilege escalation, unexpected shell executions, file modifications.
Falco
Falco monitors system calls and sends alerts to Slack, PagerDuty or a SIEM. No agent inside the container needed — runs as DaemonSet.
7. Compliance & CIS Benchmark
| CIS | Area | Check | kube-bench |
|---|---|---|---|
| 1.1 | API Server | anon-auth=false, audit-log enabled | ✅ |
| 1.2 | API Server Auth | RBAC enabled, node auth | ✅ |
| 2.1 | etcd | TLS, peer auth | ✅ |
| 3.1 | Control Plane | Kubelet auth, cert rotation | ✅ |
| 4.2 | Kubelet | anon=false, read-only=false | ✅ |
| 5.1 | RBAC | No cluster-admin wildcard | ✅ |
| 5.2 | Pod Security | PSA restricted on prod | ✅ |
| 5.7 | Network Policies | Default-deny in all NS | ✅ |
Kubernetes Security FAQ
What is the most important first step in securing Kubernetes?
Configure RBAC correctly: least-privilege for all service accounts, no cluster-admin bindings for workloads, regular role audits.
How do I test my Kubernetes Network Policies?
Use kubectl exec into a test pod and curl/netcat to other services. Blocked connections MUST produce a timeout. Use cilium-connectivity-test for automated tests.
What is Pod Security Admission and how do I enable it?
PSA replaces PodSecurityPolicy (removed since K8s 1.25). Set a label on the namespace: kubectl label namespace my-ns pod-security.kubernetes.io/enforce=restricted
Which CIS Kubernetes Benchmark checks are most important?
CIS 1.1 (API Server), CIS 4.2 (Kubelet), CIS 5.1 (RBAC). Tools: kube-bench runs directly on the node and gives Pass/Fail per check.
How do I secure the Kubernetes supply chain?
Image signing with Cosign/Sigstore, admission webhook that only allows signed images (Connaisseur or Kyverno), SBOM generation per image with Syft.