Kuberenetes dynamic admission controllers allows you to validate or mutate your Kubernetes request objects to either approve or deny, or to change the object upon creation. In this hands-on lab, you will create a dynamic admission controller to add labels defined in the deployment file, as well as the needed deployment and registration configurations, and test nodes.
Successfully complete this lab by achieving the following learning objectives:
- Write Webhook
Write a mutating webhook that adds labels to pods upon creation.
- Refactor Webhook
Refactor the webhook so that the labels can be provided in the deployment code.
- Deploy Admission Controller
Create the deployment and registration configurations and apply them.
- Test Admission Controller
Run the webhook against a test pod.