Introduction: Learning Objectives
In this section, we will be able to:
- Identify the components of a Kubernetes architecture,
- identify the components of a control plane,
- and identify the components of a worker plane.
Kubernetes Architecture
This architecture diagram highlights the main components in a Kubernetes system.
Kubernetes Control Plane
- A deployment of Kubernetes is called a Kubernetes cluster.
- A Kubernetes cluster is a cluster of nodes that runs containerized applications.
- Each cluster has one master node (the Kubernetes Control Plane) and one or more worker nodes.
- The control plane maintains the intended cluster state by making decisions about the cluster and detecting and responding to events in the cluster.
- As an analogy, it is similar to a thermostat. You specify the desired temperature, and the thermostat regulates heating and cooling systems continuously to achieve the specified state.
- An example of a decision made by the control plane is the scheduling of workloads, and an example of responding to an event is creating new resources when an application is deployed.
Kubernetes Worker Nodes
- Nodes are the worker machines in a Kubernetes cluster. In other words, user applications are run on nodes.
- Nodes are not created by Kubernetes itself, but rather by the cloud provider. This allows Kubernetes to run on a variety of infrastructures.
- The nodes are then managed by the control plane.
Kubernetes API Server
- In the Kubernetes control plane, the Kubernetes API server exposes the Kubernetes API.
- The API server serves as the front-end for the control plane.
- All communication in the cluster utilizes this API. For example, the Kubernetes API server accepts commands to view or change the state of  the cluster.
- The main implementation of a Kubernetes API server is kube-apiserver which is designed to scale horizontally—by deploying more instances.
- You can run several instances of kube-apiserver and balance traffic between those instances.
Etcd
- Etcd is a highly available, distributed key value store that contains all the cluster data.
- When you tell Kubernetes to deploy your application, that deployment configuration is stored in etcd.
- Etcd defines the state in a Kubernetes cluster, and the system works to bring the actual state to match the desired state.