The Kubernetes API
As we learned previously, the Kubernetes API server is the main gateway for all cluster operations. When we want to know the state of the cluster, the number of nodes or pods or other resources, and their state, we need to use the Kubernetes API. The same is valid for all operations, such as creating new pods or making changes in the specifications of other resources. In a nutshell, the API server is the brain of K8s.
There are multiple ways to interact with the Kubernetes API:
- Kubectl: A command-line interface tool available for all common platforms, including Linux, Windows, and macOS. Operators very often use
kubectl
to interact with K8s clusters and manage or debug applications running in Kubernetes. - dashboard (kube-dashboard): A popular web-based graphical user interface. It allows you to view, create, and modify resources, as well as troubleshoot applications running in K8s.
dashboard
, however, does not support all functionality thatkubectl
...