Kubernetes 101 : REST APIs, the API-server and the kubernetes resources

Kubernetes objects are grouped under different API sets.

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
  • ...... 
For the kubernets "intrinsic" functions, we use the following APIs: "/api" and "/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
  • .....
The "/apis" represent what is called the named group. It consists of categories that are given a clear name to differentiate them, for example:
  • /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 - networkingpoliciesdeployments, statefulsets - : 
  • /apis/networking.k8s.io/v1/networkingpolicies
  • /api/apps/v1/deployments
  • /api/apps/v1/statefulsets
  • ......
Each object, for example "deployment" has a set of "verbs" associated with it - get, update, create, ... -


Leave as a comment: