Install Container Run Time On Master Node And Each Worker Node
First of all, for installing Kubernetes, we need to have one of the container runtime services. In this tutorial, we will use Containerd. Containerd is a container runtime that manages the lifecycle of a container virtual machine. It is a process, which creates, starts, stops, and destroys containers. It is also can download container images from container registries, mount storage, and enable networking for a container.
There are no containerd packages in the default CentOs repository and because of that, we need to add this package. For adding it we need to execute the following command.
sudo yum install -y yum-utils && sudo yum-config-manager --add-repo
https://download.docker.com/linux/centos/docker-ce.repo
After adding containerd package to the repository we can install cntainerd service using the “yum” package management tools. For that, we will run the following command, where “yum-utils” – dependency for correct work containerd. And after successful installation, we need to remove auto-generated the config file “config.toml”. This is necessary to avoid errors when starting kubernetes in feature.
sudo yum install -y yum-utils containerd.io
&& rm -I /etc/containerd/config.toml
For now, the containerd was successfully installed but it has not yet been launched. Also, we need to enable our service to autostart after a system reboot. For that, we need to run the following command.
sudo systemctl enable containerd && sudo systemctl start containerd
After executing the previous command we will check that service is active and successfully running. This command will show you the status of your service.
sudo systemctl status containerd
How To Deploy Kubernetes on CentOS?
Kubernetes cluster is a set of nodes that execute applications within containers. Clusters consist of a master node and several worker nodes. These nodes could be physical computers or virtual machines. It depends on the configuration of the cluster. The master node manages and coordinates the worker node. The worker nodes are responsible for executing tasks and running containerized applications by the master node’s directions.
steps needed to deploy Kubernetes on CentOS. We will install container runtime, install Kubernetes on CentOS, create Kubernetes Cluster, and connect Worker nodes to the cluster.
Contact Us