Setup Kubernetes on Ubuntu 16.04 (Part 1)

In order to proceed further in understanding how to install and use Kubernetes, it is important to have some foundational knowledge about Kubernetes and containers. With container you can run variety of software component and Kubernetes is used to manage those container so termed as “container management technology”

Kubernetes Cluster Architecture

Pre-requisite as per above diagram,

* Master Node

* Worker Node-1

* Worker Node-2

The first step in setting up a new cluster is to install a container runtime such as Docker. In this tutorial, we will be installing Docker on our three servers in preparation for standing up a Kubernetes cluster

Installation Of Docker

For Ubuntu:

curl -fsSL | sudo apt-key add -

sudo add-apt-repository \
   "deb [arch=amd64] \
   $(lsb_release -cs) \

sudo apt-get update

sudo apt-get install -y docker-ce

You can verify that docker is working by running this command:

sudo docker version

Refer for other OS Here

Installation Of K8s

Now that Docker is installed, we are ready to install the Kubernetes components. I will be installing Kubeadm, Kubelet, and Kubectl on all three servers.

curl -s | sudo apt-key add -

cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb kubernetes-xenial main

sudo apt-get update

sudo apt-get install -y kubelet kubeadm kubectl

After installing these components, verify that Kubeadm is working by getting the version info.

kubeadm version

Kubeadm – Responsible for setting up most of the cluster component automatically

Kubelet – An agent installed on every node responsible to make sure desired no. of container are running inside pod.

Kubectl – Client used to interact with k8s cluster

Kube-proxy – Responsible to control the flow of traffic in and out of the cluster using iptable rules


Add a Comment

Your email address will not be published. Required fields are marked *