In this article, we will have a look at the main components of Kubernetes and their usage through a simple example.
Scope of this article
This article does not attempt to give advanced instructions on how to use Kubernetes. Instead, it is designed to provide basic concepts and instructions for developers who want to play around with Kubernetes in their local environment and to get an overall picture of Kubernetes through practice.
In order to execute Kubernetes on your local machine, the Kubernetes option needs to be enabled in the Docker Desktop. (If you haven’t installed the Docker Desktop, go to the download page and install it.)
Go to the
Docker Desktop >
Kubernetes and enable the option:
The key idea behind Kubernetes is to keep your application in the desired state by continuously comparing the actual state with the desired state.
In a nutshell, what we need to do is to define the desired state in a YAML file and pass it to Kubernetes, then Kubernetes will manage and monitor your application. To achieve this, Kubernetes consists of a set of components below:
Control Plane is responsible for managing your application in the desired state. The
kube-apiserver exposes the Kubernetes API and allows you to send your desired state (YAML file) to the Control Plane. Once you send the desired state through the
kube-apiserver , Kubernetes stores the state data into