Day31 of 90daysofdevopschallenge

Day31 of 90daysofdevopschallenge

What is Minikube?

Minikube is a tool that quickly sets up a local K8s cluster on any OS. It can deploy as a VM, a container, or on bare metal.

Minikube typically uses a virtualization technology like VirtualBox, Hyper-V, or Docker to create an isolated environment for the Kubernetes cluster. Users can interact with the cluster using the Kubectl command-line tool, just like they would with a larger production-grade Kubernetes cluster.

Features of Minikube:-

  • It supports the latest K8s release

  • cross-platform

  • Deploy as a VM, a container, or on Bare Metal

  • multiple container runtimes (Docker, Containerd, CRI-O)

  • Advanced features such as Load Balancer, File system mounts, Feature Gates, and Network policy.

  • Addons for easily installed K8s applications.

  • Supports common CI environments.

Task 1:

Install minikube on your local.

  • sudo privileges

  • 2CPUs or more

  • 2GB of free memory

  • 20GB of free disk

  • Docker

  • kubectl

Step 1: Update your package lists to make sure you are getting the latest version and dependencies.

sudo apt update image

Step 2: Install Required Packages Install some basic required packages.

sudo apt install -y curl wget apt-transport-https image

Step 3: 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 image

Start and enable Docker.

sudo systemctl enable --now docker Add current user to docker group (To use docker without root)

sudo usermod -aG docker $USER && newgrp docker Now, logout (use exit command) and connect again.

Step 4: Install Minikube First, download the Minikube binary using curl:

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 Make it executable and move it into your path:

chmod +x minikube sudo mv minikube /usr/local/bin/ image

Step 5: Install kubectl Download kubectl, which is a Kubernetes command-line tool.

curl -LO "[dl.k8s.io/release/$(curl](https://dl.k8s.io.. -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl/bin/linux/amd64/kubectl)" Check above image ⬆️ Make it executable and move it into your path:

chmod +x kubectl sudo mv kubectl /usr/local/bin/ image

Step 6: Start Minikube Now, you can start Minikube with the following command:

minikube start --driver=docker This command will start a single-node Kubernetes cluster inside a Docker container.

Step 7: Check Cluster Status Check the cluster status with:

minikube status image

You can also use kubectl to interact with your cluster:

kubectl get nodes

Task 2:

Pod:- The pod is the smallest deployable unit in K8s.

It is a group of one or more containers that are deployed together on the same host which shares storage, and network resources, and a specification for how to run the containers.

A Pod models an application-specific "logical host"; it contains one or more application containers that are relatively tightly coupled.

Create your first pod on Kubernetes through minikube.

These are the steps we follow to install Minikube and create pods using Kubernetes CLI. Hope this article helped you to understand the basics.

Thank you everyone for taking out time to read so far. Feel free to explore more of my content and also share your feedback.

Kavita Pant