Ivan Velichko
Ivan Velichko

@iximiuz

4 Tweets 9 reads Apr 02, 2022
Kubernetes API is a regular HTTP REST API.
Much like any other API, it can be extended:
- By adding new endpoints
- By adding new request handlers
Adding a new endpoint is as simple as registering a Custom Resource. But how to add a new request handler? 🔽
Custom Kubernetes controllers can be seen as fancy request handlers:
- You interact with controllers by creating/updating objects of the new resource type
- You get processing results back via the object's status field
Unlike traditional handlers, controllers run asynchronously
Is there a way to add synchronous request handlers?
Kubernetes supports registering API request interceptors through Admission Webhooks:
- Webhooks block API request processing
- Webhooks can mutate and/or validate objects
- Webhooks can have side effects - but don't abuse it!
You can read more about the ways to extend the Kubernetes API in my recent write-up 🔽
iximiuz.com

Loading suggestions...