Kubernetes CIS Benchmark Hardening
February 13, 2026
|
Kubernetes
Security
Compliance
kube-bench and top 20 remediations.
Kubernetes CIS Benchmark Hardening
The Center for Internet Security (CIS) Kubernetes Benchmark provides a comprehensive set of security recommendations for hardening Kubernetes clusters. This guide covers the top 20 remediations that address the most critical security gaps.
Running kube-bench
kube-bench automates CIS benchmark checks against your cluster:
# Run on a node
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml
# Check results
kubectl logs job/kube-benchTop 20 Remediations
Control Plane Hardening (1-5)
- Enable audit logging — Log all API server requests for forensic analysis
- Enable RBAC — Ensure
--authorization-mode=RBACis set on the API server - Disable anonymous auth — Set
--anonymous-auth=falseon the API server - Encrypt etcd at rest — Configure
--encryption-provider-configwith AES-256 - Use TLS for etcd — Enable client and peer TLS certificates for etcd communication
Worker Node Hardening (6-10)
- Restrict kubelet anonymous access — Set
authentication.anonymous.enabled: false - Enable kubelet certificate rotation — Set
rotateCertificates: truein kubelet config - Protect kubelet port — Ensure port 10250 is firewall-restricted
- Set file permissions — kubelet config and certificate files should be 600/644
- Disable read-only port — Set
readOnlyPort: 0in kubelet config
Pod Security (11-15)
- Enable Pod Security Admission — Enforce restricted or baseline pod security standards
- Prevent privileged containers — Deny pods with
privileged: true - Prevent root containers — Enforce
runAsNonRoot: true - Drop all capabilities — Set
securityContext.capabilities.drop: [ALL] - Use read-only root filesystem — Set
readOnlyRootFilesystem: true
Network and Access (16-20)
- Deploy network policies — Default-deny in all namespaces
- Restrict service account tokens — Set
automountServiceAccountToken: falseunless needed - Use namespace isolation — Separate workloads by namespace with RBAC boundaries
- Scan container images — Enforce image scanning admission controllers
- Limit host namespaces — Block
hostNetwork,hostPID,hostIPC
Pod Security Standards
# Enforce restricted standard on production namespace
kubectl label namespace production \
pod-security.kubernetes.io/enforce=restricted \
pod-security.kubernetes.io/warn=restricted \
pod-security.kubernetes.io/audit=restrictedSecure Pod Template
spec:
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 1000
seccompProfile:
type: RuntimeDefault
containers:
- name: app
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: [ALL]
readOnlyRootFilesystem: true
resources:
limits:
cpu: "1"
memory: 512Mi
requests:
cpu: 100m
memory: 128MiCompliance Tracking
Run kube-bench on a schedule and track compliance scores over time:
# CronJob for weekly benchmark check
apiVersion: batch/v1
kind: CronJob
metadata:
name: kube-bench-weekly
spec:
schedule: "0 6 * * 1" # Every Monday at 6 AM
jobTemplate:
spec:
template:
spec:
containers:
- name: kube-bench
image: aquasec/kube-bench:latest
command: ["kube-bench", "--json"]
restartPolicy: NeverEazy SaaS Tip: We run kube-bench as part of our Kubernetes hardening service. The initial scan typically shows 40-60% compliance. After applying our standard remediation playbook, clients reach 90%+ compliance within a week — meeting the requirements for SOC 2 and ISO 27001 audits.