- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Core Tech
Policy-as-Code Implementation in Kubernetes using Kyverno
In this lab, you'll implement Policy-as-Code in Kubernetes using Kyverno. You'll install the Kyverno policy engine, create validation policies that block dangerous configurations like privileged containers and root users, and implement mutation policies that automatically inject secure defaults into non-compliant workloads.
Lab Info
Table of Contents
-
Challenge
Deploy and configure Kyverno to establish the policy enforcement foundation
Before enforcing strict policies that could break existing applications, the platform team needs proof that Kyverno is operational and can evaluate both new and existing resources. You'll install Kyverno and confirm it's intercepting admission requests and scanning the cluster.
-
Challenge
Block high-risk configurations using validation policies that enforce security baselines
Security requires that no production workload can request CAP_SYS_ADMIN or run as UID 0, as these configurations have led to container breakouts in the past. You'll implement validation policies that automatically reject such deployments at admission time, preventing dangerous configurations from ever reaching the cluster.
-
Challenge
Automate security remediation using mutation policies that fix common misconfigurations
Many developers are unfamiliar with Kubernetes security best practices and deploy workloads without proper security contexts. Rather than rejecting these deployments, you'll implement mutation policies that automatically add secure defaults, improving security posture without blocking deployments or requiring developer education.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.