Sobes.tech
Middle+

For what practical tasks can Admission Controller be used? What is the difference between Validating and Mutating webhooks?

sobes.tech AI

Answer from AI

The Admission Controller in Kubernetes is used to control and modify objects during their creation or update. Practical tasks include:

  • Validation of configurations (e.g., checking compliance with security policies).
  • Automatic addition or modification of fields in manifests (e.g., adding sidecar containers).
  • Resource limitation and access management.

The difference between Validating and Mutating webhooks:

  • Mutating webhook can modify the object before it is saved, for example, adding labels or changing specifications.
  • Validating webhook only checks the object and can reject the request if the object does not meet the requirements, but does not modify it.

Thus, Mutating webhook is used for automatic changes, while Validating is for checking and rejecting incorrect objects.