☸Day 31 - Launching your First Kubernetes Cluster with Nginx running

☸Day 31 - Launching your First Kubernetes Cluster with Nginx running

  1. What is minikube?

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.

  1. Features of minikube

Ans :-

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

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

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

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

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

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

(g) Addons for easily installed Kubernetes applications

(h) Supports common CI environments

🎯Task-01:

✔️Install minikube on your local

Step 1: Update System Packages

sudo apt update

Step 2: Install Required Packages

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

Step 3: Install Docker

sudo apt-get install docker.io

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

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/

Step 5: Install kubectl

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:

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

Step 6: Start Minikube

minikube start --driver=docker

Step 8: Stop Minikube

When you are done, you can stop the Minikube cluster with:

minikube stop

✔️Let's understand the concept pod

Ans:-

Pods are the smallest deployable units of computing that you can create and manage in Kubernetes.

A Pod (as in a pod of whales or pea pod) is a group of one or more containers, with shared storage and network resources, and a specification for how to run the containers. A Pod's contents are always co-located and co-scheduled, and run in a shared context. A Pod models an application-specific "logical host": it contains one or more application containers which are relatively tightly coupled.

You can read more about pod from here .

🎯Task-02:

✔️Create your first pod on Kubernetes through minikube.

We are suggesting you make an nginx pod

Step 1: Create manifest file

apiVersion: v1 
kind: Pod 
metadata: 
    name: nginx 
spec: 
    containers: 
        - name: nginx 
          image: nginx:1.14.2 
          ports: 
             - containerPort: 80

Step 2: Run the pod.yml file

📚Happy Learning :)