Now add Kubernetes package repository key using the following command, :~$ curl -s | sudo apt-key add
Let’s first install some required packages, run the following commands on all the nodes including master node ~$ sudo apt-get install apt-transport-https curl -y Note: All the commands in this step are mandate to run on master and slave nodes ~$ Step:3) Configure Kubernetes Package Repository on Master & Slave Nodes Use below docker command to verify which Docker version has been installed on these systems, ~$ docker -version Synchronizing state of rvice with SysV service script with /lib/systemd/systemd-sysv-install.Įxecuting: /lib/systemd/systemd-sysv-install enable docker Once the Docker packages are installed on all the three systems, start and enable the docker service using below systemctl commands, these commands needs to be executed on master and slave nodes.
Run the below apt-get command to install docker on slave nodes, :~$ sudo apt-get install docker.io -y Run the below apt-get command to install Docker on Master node, :~$ sudo apt-get install docker.io -y
:~$ sudo hostnamectl set-hostname k8s-worker-node2Īdd the following lines in /etc/hosts file on all three systems, 192.168.1.70 k8s-masterġ92.168.1.90 k8s-worker-node2 Step:2) Install and Start Docker Service on Master and Slave Nodes Login to Slave / Worker Nodes and configure their hostname respectively using the hostnamectl command, :~$ sudo hostnamectl set-hostname k8s-worker-node1 Login to the master node and configure its hostname using the hostnamectl command :~$ sudo hostnamectl set-hostname "k8s-master"
Step:1) Set Hostname and update hosts file Let’s jump into the k8s installation and configuration steps.
Note: Kubernetes Slave Node is also known as Worker Node