Kubernetes Security
Definition
Kubernetes security covers protecting a cluster's control plane, nodes, workloads and container images – from authentication to network segmentation.
What for?
A cluster bundles many applications. Misconfigurations or vulnerable components (e.g. ingress controllers) could otherwise open access to all workloads and secrets.
Technical architecture
flowchart LR U[User / CI] -->|authn + RBAC| API[kube-apiserver] API --> ADM[Admission control - Pod Security, policies] ADM --> ETCD[(etcd - encrypted secrets)] API --> N[Nodes] N --> P[Pods - non-root, read-only FS] P -.->|NetworkPolicy| P2[Other pods] REG[Image registry - signed, scanned] --> N AUD[Audit logs] --- API
Core components
Practical examples
- A NetworkPolicy allows database connections only from the backend namespace.
- An admission controller rejects pods that want to run as root.
Enterprise use cases
- Tenant isolation in shared clusters
- Patching vulnerable cluster components quickly
- Proving security requirements in audits
Quiz
1. What does RBAC control in Kubernetes?
Role-based access control defines which users and service accounts may perform which actions on which resources.
2. What are NetworkPolicies for?
Without NetworkPolicies, pods may communicate with each other by default.
3. What does the “restricted” Pod Security Standard prevent, among other things?
The “restricted” standard forbids e.g. privileged containers and requires running as non-root.
Related news
No related news yet.