Kubernetes Security Architecture Overview
You'll learn the layered security model of Kubernetes and identify where threats can emerge in its architecture.
What is Kubernetes Security Architecture?
Kubernetes is a complex system with multiple components working together to orchestrate containers. Think of it like a medieval castle: there's no single wall protecting everything—instead, you have layers of defenses from the outer gates to the inner keep. Each layer in Kubernetes has its own security responsibilities and potential vulnerabilities.
The Three Main Security Layers
1. API Server (The Central Gateway)
The API server is Kubernetes' control center—every command, deployment, and configuration change flows through it. This is the primary attack surface. If an attacker compromises the API server or obtains valid credentials, they can control your entire cluster. It handles authentication, authorization, and admission control.
2. Control Plane Components
The control plane includes the scheduler, controller manager, and etcd (the cluster's database). These components make decisions about where workloads run and store sensitive cluster state. The etcd datastore is particularly critical—it contains all cluster secrets, configurations, and state information. Compromise here means total cluster takeover.
3. Node Components
Nodes run your actual workloads via the kubelet agent and container runtime. Each node has its own threat surface: the kubelet API can be exploited, containers might escape their isolation, and container images may contain vulnerabilities. Network policies between pods also operate at this layer.
Key Threat Surfaces
- Unauthenticated or over-privileged API access
- Exposed etcd without encryption
- Insecure kubelet configurations
- Container runtime vulnerabilities
- Weak pod security boundaries
Key Takeaway: Kubernetes security is defense-in-depth—protect the API gateway, harden the control plane, secure etcd storage, lock down node components, and enforce least privilege at every layer.