Improving Kubernetes Security With Admission Controllers
Description
Admission controllers are a powerful feature of Kubernetes that allow you to enhance the security of the cluster. Admission controllers are the final stage of the Kubernetes API request processing pipeline before being accepted into the cluster. Kubernetes ships with several admission controllers are enabled by default, and additional ones can be enabled as needed. Examples of functionality that can be implemented with admission controllers include:
- Enforcing resource quotas within Namespaces
- Enforcing that container images are always pulled and come from trusted registries
- Preventing certain types of denial of service incidents
You will explore two admission controllers in depth in this lab as case studies in Kubernetes admission control:
- The
NamespaceAutoProvision
admission controller automatically creates Namespaces when resources are attempted to be created in Namespaces that do not exist. - The
EventRateLimit
admission controller can reduce the impact of new Events flooding the API server.
Learning objectives
Upon completion of this intermediate-level lab, you will be able to:
- Enable and disable Kubernetes admission controllers
- Enable advanced admission controllers requiring additional configuration files
- Use
vi
to edit Kubernetes API server manifests
Intended audience
- Candidates for the Certified Kubernetes Security Specialist (CKS) exam
- DevOps Engineers
- Security Practitioners
Prerequisites
Familiarity with the following will be beneficial but is not required:
- Kubernetes Pods
- Kubernetes Volumes
The following content can be used to fulfill the prerequisites:
Updates
July 13th, 2024 - Updated cluster to Kubernetes 1.30