In this chapter, we have been introduced to Kubernetes as a container orchestrator. Kubernetes makes a cluster of servers that run containers appear as one big logical server. As an operator, we declare a desired state to the cluster and Kubernetes continuously compares the desired state with the current state. If it detects differences, it takes actions to ensure that the current state is the same as the desired state.
The desired state is declared by creating resources using the Kubernetes API server. The controller manager in Kubernetes and its controllers react to the various resources that were created by the API server and takes actions to ensure that the current state meets the new desired state. The scheduler assigns nodes to newly created containers, that is, pods that contain one or more containers. On each node, an agent, kubelet, runs and ensures that the...