Admission webhook
There are two major components to implementing an Admission webhook controller: a webhook HTTP server to receive the resource life event and a ValidatingWebhookConfiguration or MutatingWebhookConfiguration resource configuration file. Please refer to https://github.com/PacktPublishing/DevOps-with-Kubernetes-Second-Edition/tree/master/chapter5/5-3_admission-webhook/sample-validating-admission-webhook for the source code of our sample Admission webhook.
Let's look at how to write a ValidatingWebhookConfiguration. As we can see in the following code, like normal objects, ValidatingWebhookConfiguration has an API version, a kind, and metadata with a name and labels. The important session is named webhooks. In webhooks, one ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access