Kubernetes 101 : API server communications - HTTP and REST APIs -
The API server is the beating heart of the kubernetes cluster.
It manages - list, delete, update, ... - the kubernetes API resources - pods, deployments, ... -.
The API server uses the HTTP REST interface for its communication with the different components of the kubernetes cluster.
- GET : used for getting data about the different kubernetes API resources - pods, services, ... -.
- POST : used to create a kubernetes resource.
- PUT : used to update a kubernetes resource.
- PATCH : used for small updates.
- DELETE : used for deleting a kubernetes resource.
Example:
The below command:
Is equivalent to:
Each kubernetes resource belongs to an API group and has a version as follows "/apis/Group/version/namespaces/ns_name/resource".
For example:
Nodes for example are not namespaced, their API description looks like the following "/api/v1/nodes".
Comments