Creating Controllers with Custom Logic
As mentioned earlier, Kubernetes provides a list of controllers with predefined functionality. These controllers are baked into the Kubernetes server binary. However, what happens if you need to have your own policy or standard to check against, and none of the admission controllers fit your requirements?
To address such a requirement, Kubernetes provides something called admission webhooks. There are two types of admission webhooks, which we will study in the following sections.
The Mutating Admission Webhook
The mutating admission webhook is a type of mutating admission controller that doesn't have any logic of its own. Instead, it allows you to define a URL that will be called by the Kubernetes API server. This URL is the address to our webhook. Functionally, a webhook is an HTTPS server that accepts requests, processes them, and then responds back.
If multiple URLs are defined, they are processed in a chain, that is, the output...