Back to photostream

Kubernetes Cluster Setup in Laptop Using VirtualBox

- Download VirtualBox: www.virtualbox.org/wiki/Downloads

- Download Ubuntu 20.04.3 LTS: ubuntu.com/download/desktop/thank-you?version=20.04.3&amp...

- Install Ubuntu three times so that we will have 3 nodes for Kubernetes cluster. One Master node and other two as worker nodes.

- Create a NAT Network in Virtual Box (e.g. "Kubernetes Network") from Network preferences section. Use Network CIDR as 10.0.2.0/24

 

- Attach NAT network to all three instances

 

- Set the hostnames of VMs as following:

 

sudo hostnamectl set-hostname k8s-control for Master node

 

sudo hostnamectl set-hostname k8s-worker1 for Worker node 1

 

sudo hostnamectl set-hostname k8s-worker2 for Worker node 2

 

- Edit /etc/hosts file to include IPs of all three nodes. For e.g.

 

10.0.2.4 k8s-worker1

10.0.2.15 k8s-control

10.0.2.5 k8s-worker2

 

- Run Following Commands in each of the nodes

 

cat

 

hacksheets.in/kubernetes-cluster-setup-in-laptop-using-vi...

87 views
0 faves
0 comments
Uploaded on December 30, 2021