Installation of Minikube
Step 1: Create EC2 instances
- Click on "Launch instance" on EC2 Dashboard.
- Give name&tag > Select "Ubuntu" AMI
- Select instance type "t2.medium" > Create new key-pair
- โ Allow all traffic in "Network Settings" & Configure Storage "10" gb and click on "Launch Instance".
Step 2: โ The instance and click on "Connect".
Step 3: Connect instance through "EC2 instance connect".
Step 4: Update System Packages
sudo apt update
Step 5: Install some basic Required Packages
sudo apt install -y curl wget apt-transport-https
Step 6: Install Docker (Minikube can run a Kubernetes cluster either in a VM or locally via Docker. This guide demonstrates the Docker method.)
sudo apt install -y docker.io
Step 7: Start and enable Docker.
sudo systemctl enable --now docker
Step 8: Add current user to docker group (To use docker without root)
sudo chown $USER /var/run/docker.sock
Step 9: Install Minikube
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
Step 10: Make it executable and move it into your path
chmod +x minikube
sudo mv minikube /usr/local/bin/
Step 11: Install kubectl(Download kubectl, which is a Kubernetes command-line tool)
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
Step 12: Make it executable and move it into your path
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
Step 13: Start Minikube
minikube start
Step 14: Check Cluster Status OR You can also usekubectl
to interact with your cluster
minikube status
kubectl get nodes
Step 15: Check docker container
docker ps
Step 16: Move inside docker container
docker exec -it <container id> bash
Step 17: List down all files
ls
Step 18: Check docker container(You will see all docker container like API-server, etcd, Controller manager, Scheduler)
docker ps
Step 19: Exit from container
exit
Congratulations! You've successfully installed Minikube on your system. With Minikube, you can now create a local Kubernetes cluster and start deploying and managing containerized applications right on your machine. This setup is perfect for development, testing, and learning Kubernetes without needing a cloud provider.
Thank you ๐
Keep Learning..
Subscribe to my newsletter
Read articles from Lalita Kashyap directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by