Kubernetes 101 : REST APIs, the API-server and the kubernetes resources
The are used for interacting with the API-server which is the entry point to the kubernetes cluster.
For example, to check the version of the API-server, we use the below command:
To list the pods in our cluster, we use the below command:
Kubernetes group API based on their function in the kubernetes cluster.
Below we can see examples of API groups:
- /metris
- /healthz
- /api
- /apis
- ......
The "/api" represents what is called the core group. It holds all the main functionalities of the kubernetes cluster :
- /api/v1/pods
- /api/v1/namespaces
- /api/v1/nodes
- /api/v1/services
- .....
- /apis/networking.k8s.io
- /apis/authentication.k8s.io
- /apis/storage.k8s.io
- /api/apps
- ......
Within each one of these categories we could find our kubernetes objects like - networkingpolicies, deployments, statefulsets - :
- /apis/networking.k8s.io/v1/networkingpolicies
- /api/apps/v1/deployments
- /api/apps/v1/statefulsets
- ......
Comments