Open In App

How to install and configure Kubernetes on Ubuntu?

Improve
Improve
Like Article
Like
Save
Share
Report

Kubernetes is open-source software that helps to solve problems related to container-based software automation. It is like a container based system, which helps to distribute out the work that needs to be executed while testing software. Kubernetes are portable in nature. That is why it is widely used throughout the globe. Basically, it helps the deployment of any new build software for any new build software there are certain requirements that need to be filled out by them. This work is done by the software testers. But the work of deploying a software is not a easy enough. For that purpose, testers take the help of Kubernetes. It breaks the software into small pieces & after that testing will be easier for that simple pieces. In this way, the overall process is completed.

Features of Kubernetes

  • Kubernetes is extensive in nature. That means it can be used for other purposes of software development.
  • Kubernetes helps to configure the software also. As well as it helps the automation of the software.
  • Kubernetes dependencies are highly useful. Kubernetes tools transporter and services are available, that help to cut down the workload for deploying any software.

Installation & Configuration of Kubernetes in Linux

Here we have to install some pre-requisite for installing Kubernetes. These installations have to be done along with the installation of Kubernetes. These installations are part of its configuration.

Step 1: At first, we have to open the terminal Linux. Then we have to write the following command. This will help to install a transporter. The transporter is a component that is needed to install Kubernetes in the machine. Wait till the process is completed.

sudo apt-get install -y apt-transport-https

 

Step 2: Now, it is time to install Docker. It is a necessary item that coordinates with the Kubernetes. If docker was installed previously in the machine, then there is no problem with the following command. The terminal will simply skip this command & move forward. But if the Docker is not present in the machine, then it will take some time for its installation.

 sudo apt install docker.io

 

Step 3: Now after successful installing Docker on the machine, we have to start & enable it. Otherwise, it will not provide permission to install Kubernetes on the machine. We have to execute the below two commands.

sudo systemctl start docker
sudo systemctl enable docker

 

Note: If the docker is previously installed in the machine, there is no need to execute the Step 2 & Step 3. If Docker is installed in the machine & those steps are executed, then it will not create any fatal problem with the installation. But better prefer not to execute those steps. 

Step 4: Now after successfully starting the Docker, it is time to install Curl in Linux. As Curl will help to run many dependencies with the Kubernetes. We have to run the following command this will install the Curl in the machine. Wait till the installation is completed.

sudo apt get install curl

 

Note: There may be users who finds that installing of Curl along with Kubernetes is a waste of time. But it is a necessary one. Without Curl, installation of Kubernete will complete. But in future when they use Kubernetes they start malfunctioning. As Curl helps to auto-update Kubernetes. Without Curl Kubernetes can’t update to latest version. As a result, it will gradually stop working.

Step 5: Now it is time to install Kubernetes. Kubernetes is basically a combination of four dependencies. They are Kubelet, Kubeadm Kubectl, and Kubernetes. These dependencies are a combination of many other dependencies. We have to install these main dependencies. For that purpose, we have to execute the below-mentioned below mentioned command. This will help to install these dependencies.

sudo apt-get install -y kubelet kubeadm kubectl kubernetes-cni

 

Step 6: We have to wait for some time. As the installation of Kubernetes will take some time. The consumption of time may depend upon the speed & configuration of the machine.

 

Step 7: Now, we have installed Kubernetes. Along with this, we have configured the necessary parts of it. Now, it is time to configure & start Kubernetes in the machine. For that purpose, we have to run the following command. This command will initialize the Kubernetes in the machine. Wait till the process is completed.

sudo kubeadm init

 

Step 8: After completion of the above state, there will be a message displayed. That will state that the Control Panel of the Kubernetes has initialized. So, the Kubernetes has started working. Hence, the installation & configuration of Kubernetes is successfully completed.

 


Last Updated : 28 Dec, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads