# Day 30 Task: Launching your First Kubernetes Cluster with Nginx.

1. **<mark>What is minikube?</mark>**
    

Ans:- *Minikube is a tool which quickly sets up a local Kubernetes cluster on macOS, Linux, and Windows. It can deploy as a VM, a container, or on bare-metal.*

*Minikube is a pared-down version of Kubernetes that gives you all the benefits of Kubernetes with a lot less effort.*

*This makes it an interesting option for users who are new to containers, and also for projects in the world of edge computing and the Internet of Things.*

2\. **<mark>Features of minikube</mark>**

(1) Supports the latest Kubernetes release (+6 previous minor versions)

(2) Cross-platform (Linux, macOS, Windows)

(3) Deploy as a VM, a container, or on bare-metal

(4) Multiple container runtimes (CRI-O, containerd, docker)

(5) Direct API endpoint for blazing fast image load and build

(6) Advanced features such as LoadBalancer, filesystem mounts, FeatureGates, and network policy

(7) Addons for easily installed Kubernetes applications

(8) Supports common CI environments

## <mark>Task-01:</mark>

How Install minikube on your local:

<mark>This guide provides step-by-step instructions for installing Minikube on Ubuntu. Minikube allows you to run a single-node Kubernetes cluster locally for development and testing purposes.</mark>

Step1. <mark>Pre-requisites</mark>

* *Ubuntu OS*
    
* *sudo privileges*
    
* *Internet access*
    
* *Virtualization support enabled (Check with* `egrep -c '(vmx|svm)' /proc/cpuinfo`*, 0=disabled 1=enabled)*
    

Step2. <mark> go to your aws account then create a EC2 inatance thier should have 2CPU and 4GB RAM.(select the instance type t2.medium).</mark>

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1702667645583/2ec8cd6d-544f-4c12-b4a5-bd545bd920ef.png align="center")

Step3. <mark>Update System Packages:</mark>

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

*#sudo apt update -y*

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1702668044554/087fdbef-2a62-476c-9673-28b5a31c715d.png align="center")

Step4: <mark>Install Required Packages</mark>: #*sudo apt install -y curl wget apt-transport-https*

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1702668301343/d094301e-9f7a-48b8-a73c-fbdf1da221c1.png align="center")

Step5: <mark> Install Docker</mark>

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](http://docker.io)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1702668452880/3209cf7f-6ba6-40e3-b360-fec353ad1ef4.png align="center")

Step6: <mark>Start and enable Docker.</mark>

```bash
sudo systemctl enable --now docker
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1702668561042/c1095419-23fe-47a1-b159-e18824d3da74.png align="center")

Step7: <mark>Add current user to docker group (To use docker without root)</mark>

```bash
sudo usermod -aG docker $USER && newgrp docker
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1702668604551/286c35cd-d1aa-4094-acbe-3f6f36859ab3.png align="center")

Step8: <mark>Install Minikube</mark>

First, download the Minikube binary using `curl`:

```bash
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1702668716436/1d4fc533-6354-409e-842e-91adf579f266.png align="center")

Make it executable and move it into your path:

```bash
chmod +x minikube
sudo mv minikube /usr/local/bin/
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1702668783228/1c98f3e4-a60c-4b9f-8c55-6887f556f463.png align="center")

Step 9 <mark>Install kubectl</mark>

Download kubectl, which is a Kubernetes command-line tool.

```bash
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
```

**Check above image ⬆️** Make it executable and move it into your path:

```bash
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1702669011293/d37a6c96-4bf5-47c1-bcdb-3e6df64392d1.png align="center")

## Step 10: <mark>Start Minikube</mark>

## Now, you can start Minikube with the following command:

```bash
minikube start --driver=docker
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1702669153289/f0827f8a-f08d-4990-a303-ca20106ba2ff.png align="center")

This command will start a single-node Kubernetes cluster inside a Docker container.

## Step 11: <mark>Check Cluster Status</mark>

## Check the cluster status with:

```bash
minikube status
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1702669239711/16899508-d949-4901-bc02-e879078b99b8.png align="center")

## <mark>Task-02:</mark>

## *Create your first pod on Kubernetes through minikube.*

we want to create a pod using the command so please find the below command through which we will be create a pod:

\# kubectl run pod name --image=image name --ports deatils

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1702670017719/7ff00047-f777-430c-901b-955215d84685.png align="center")

Today i have cover what is minikube and how to install in aws EC2 inatanec and how to create a pod using the minikube. so i have request to you if you read my blog and if you liked it that please like and command my blog then also follow my linkden Profile.

Thanks for read my blog if you liked it this blog please like and commend.

Contact me on [**linkedin**](http://www.linkedin.com/in/pradeep-chitroliya-9347a9147)

check out my GitHub for more resource [**GitHub**](https://github.com/ChitrolyaPradeep)

##
