Kubernetes Curriculum
On this page
- Hardening Overview
- 1. Architectural Concept & Deep Dive
- 2. Threat Modeling: MITRE ATT&CK for Kubernetes
- 3. Control Plane vs Data Plane Threat Vectors
- 1. Control Plane Security Priorities:
- 2. Data Plane Security Priorities:
- 4. The NSA / CISA Kubernetes Hardening Guidance
- 5. Security Posture Assessment Workflow
- 6. Key Takeaways
Hardening Overview
1. Architectural Concept & Deep Dive
Securing a Kubernetes cluster requires recognizing that Kubernetes is not a single monolith, but a distributed orchestration system spanning physical infrastructure, kernel virtualization, API authorization, and container runtimes.
The Cloud Native Computing Foundation (CNCF) and the National Security Agency (NSA / CISA) define the standard defense-in-depth model known as the 4Cs of Cloud Native Security:
- Cloud / Infrastructure: Physical data centers, hypervisors, cloud IAM, VPC networks, and firewall rules.
- Cluster: Kubernetes Control Plane (API server, etcd, scheduler, controller-manager) and Worker Node daemons (kubelet, kube-proxy, CRI).
- Container: Container image registries, base image CVEs, non-root users, Linux capabilities, and runtime sandboxes.
- Code: Application source code, third-party libraries, TLS endpoints, and business logic.
The Golden Rule of Cloud Native Security: A breach at an outer layer compromises all inner layers. If the underlying Cloud IAM or physical host is compromised, no amount of in-cluster RBAC or container hardening can protect the workload.
2. Threat Modeling: MITRE ATT&CK for Kubernetes
The MITRE Corporation categorizes adversary techniques targeting Kubernetes into a standardized threat matrix:
3. Control Plane vs Data Plane Threat Vectors
1. Control Plane Security Priorities:
- Close public API server endpoints; use VPC private endpoints or VPN-gated ingress.
- Enforce strict mutual TLS (mTLS) with internal PKI between API server, etcd, and kubelets.
- Encrypt etcd storage at rest using Cloud KMS (AWS KMS, Google Cloud KMS, HashiCorp Vault).
2. Data Plane Security Priorities:
- Implement Pod Security Standards (
baselineorrestricted) across all application namespaces. - Enforce default-deny egress and ingress
NetworkPolicyrules. - Eliminate host network (
hostNetwork: true), host PID, and host IPC sharing.
4. The NSA / CISA Kubernetes Hardening Guidance
The United States NSA and CISA published an authoritative Kubernetes Hardening Guide. Its core technical mandates include:
- Pod Security:
- Run containers as non-root users (
runAsNonRoot: true). - Use immutable read-only root filesystems (
readOnlyRootFilesystem: true). - Drop all unnecessary Linux capabilities (
capabilities.drop: ["ALL"]).
- Run containers as non-root users (
- Network Isolation:
- Never rely on default open networking; explicitly declare ingress and egress firewall rules for every microservice.
- Restrict access to the cloud metadata service (
169.254.169.254) to prevent AWS IAM role theft.
- Authentication & Authorization:
- Disable anonymous authentication on the API server and Kubelet (
--anonymous-auth=false). - Enforce least-privilege Role-Based Access Control (RBAC); audit
cluster-adminbindings.
- Disable anonymous authentication on the API server and Kubelet (
- Log Auditing & Continuous Detection:
- Enable comprehensive Kubernetes API audit logging with dynamic backends.
- Deploy eBPF-based runtime threat detection engines (Falco).
5. Security Posture Assessment Workflow
6. Key Takeaways
- The 4Cs model (Cloud, Cluster, Container, Code) mandates layered security; failure in an outer layer compromises inner layers.
- The MITRE ATT&CK matrix for Kubernetes maps out real-world adversary tactics from initial access to lateral movement.
- Modern Kubernetes hardening focuses on closing control plane exposure (etcd encryption, private endpoints) and containing data plane blast radiuses (Pod Security Standards, NetworkPolicies).
- Apply the NSA/CISA guidelines to systematically achieve compliance across production clusters.