Kubernetes Mini Kube Setup Ashok IT Cab17674 d337 4329 b3d4 F00bfde597e0
Kubernetes Mini Kube Setup Ashok IT Cab17674 d337 4329 b3d4 F00bfde597e0
Ashok
Kubernetes
(K8S)
Mini Kube
Cluster Setup
By Mr. Ashok
DevOps Mr. Ashok
Mini Kube
-> As the name suggests, minikube is a single node Kubernetes (k8s) cluster.
-> Anyone who is new to the Kubernetes and wants to learn and try deploying application
on it, then minikube is the solution.
-> Minikube provides a command line interface to manage Kubernetes (k8s) cluster and its
component.
Minikube System Requirements
• 2 GB RAM or more
• 2 CPU / vCPU or more
• 20 GB free hard disk space or more
• Docker / Virtual Machine Manager – KVM & VirtualBox
Note: We will be using Docker container as a base for minikube.
Step -1) Launch AWS EC2 Medium instance with Ubuntu AMI (Ubuntu Server 20.04)
Note: t2.medium instance we are using here
DevOps Mr. Ashok
Note: once we connect to Ec2 instance, it will open terminal like above
Step – 3) Apply all updates of existing packages of your system by executing the following
apt commands
$ sudo apt update -y
$ sudo apt upgrade -y
Once all the updates are installed then reboot your system once.
$ sudo reboot
Step – 4 ) Install Docker by executing below commands
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
$ sudo usermod -aG docker $USER && newgrp docker
Step – 5) Install Minikube dependencies
Install the following minikube dependencies by running below command
$ sudo apt install -y curl wget apt-transport-https
DevOps Mr. Ashok
Once the binary is downloaded, copy it to the path /usr/local/bin and set the executable
permissions on it by executing below commands
$ sudo cp minikube-linux-amd64 /usr/local/bin/minikube
$ sudo chmod +x /usr/local/bin/minikube
Verify the minikube version by executing below command
$ minikube version
DevOps Mr. Ashok
Once kubectl is downloaded then set the executable permissions on kubectl binary and
move it to the path /usr/local/bin by executing below commands
$ chmod +x kubectl
$ sudo mv kubectl /usr/local/bin/
Now verify the kubectl version
$ kubectl version -o yaml
DevOps Mr. Ashok
Perfect, above confirms that minikube cluster has been configured and started
successfully.
Run below minikube command to check status,
Run following kubectl command to verify the Kubernetes version, node status and cluster
info.
$ kubectl cluster-info
$ kubectl get nodes
DevOps Mr. Ashok
# Use below command to get your service url, after getting URL we can access that URL
using curl command like below
Note: If we are able to get above output, that means Nginx server deployed successfully in
Kubernetes.
Step - 10) Managing Minikube Cluster
$ minikube stop
$ minikube start