A Kubernetes cluster consists of two types of resources:
The Control Plane coordinates the cluster
Nodes are the workers that run applications The Control Plane is responsible for managing the cluster. The Control Plane coordinates all activities in your cluster, such as scheduling applications, maintaining applications' desired state, scaling applications, and rolling out new updates A node is a VM or a physical computer that serves as a worker machine in a Kubernetes cluster. Each node has a Kubelet, which is an agent for managing the node and communicating with the Kubernetes control plane. The node should also have tools for handling container operations, such as containerd or CRI-O. A Kubernetes cluster that handles production traffic shouldhave a minimum of three nodes because if one node goes down, both an etcd member and a control plane instance are lost, and redundancy is compromised. You can mitigate this risk by adding more control plane nodes.
Kubernetes API 是控制平面对外暴露的接口,它定义了一组 RESTful API,用于管理和操作 Kubernetes 集群的各种资源,如 Nodes、Pods、Services 等。除了 kubelet 和其他节点级别的组件,终端用户也可以直接使用 Kubernetes API 来与集群进行交互。例如,当你使用 kubectl 命令行工具时,kubectl 实际上是在后台调用 Kubernetes API 来执行你的命令。
kubelet vs kubectl
Node-level components, such as the kubelet, communicate with the control plane using the Kubernetes API, which the control plane exposes. End users can also use the Kubernetes API directly to interact with the cluster