...
Kubeadm: A tool for quickly installing Kubernetes and setting up a secure cluster. You can use kubeadm to install both the control plane and the worker node components.
Kubectl: a command line tool for communicating with a Kubernetes API server. You can use kubectl to create, inspect, update, and delete Kubernetes objects.
Kubelet: an agent that runs on each node in the cluster. It makes sure that containers are running in a Pod. The kubelet takes a set of PodSpecs that are provided through various mechanisms and ensures that the containers described in those PodSpecs are running and healthy. The kubelet doesn’t manage containers which were not created by Kubernetes.
Preliminary steps
First, there are some minimum requirements to be met and steps to take before proceeding with the installation of Kubeadm:
...
The swap values should all be 0 bytes. If not, comment on the swap line of the /etc/fstab
file and reboot. In this way the swap is permanently deactivated.
Installation
Installing CRI
By default, Kubernetes uses the Container Runtime Interface (CRI) to interface with your chosen container runtime. So, you need to install a CRI into each node in the cluster, in order that Pods can run there. Common CRI with Kubernetes, on Linux, are: containerd, CRI-O and Docker. We will focus on the latter. First, therefore, install Docker on each of your nodes (install Docker on CentOS).
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$ sudo mkdir -p /etc/systemd/system/docker.service.d $ sudo systemctl daemon-reload $ sudo systemctl restart docker # If you want the docker service to start on boot, run the following command $ sudo systemctl enable docker |
Installing kubeadm, kubelet and kubectl
At this point we are ready with the installation of Kubeadm
, Kubectl
and Kubelet
on all VM of the cluster (procedure valid, as well as for CentOS, also for RedHat and Fedora)
...