Day31 ----> 90DaysOfDevOps Challenge @TWS

Day31 ----> 90DaysOfDevOps Challenge @TWS

Day 31 Task: Launching your First Kubernetes Cluster with Nginx running

Awesome! You learned the architecture of one of the top most important tool "Kubernetes" in your previous task.

What about doing some hands-on now?

Let's read about minikube and implement k8s in our local machine

  1. What is minikube?

Ans:- Minikube is a tool that 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

For installation, you can Visit this page.

1. Install docker first

  • sudo apt-get update

  • sudo apt-get install docker.io

  • sudo usermod -aG docker $USER

  • sudo reboot

image

2. Install Kubectl

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

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

  • echo "$(cat kubectl.sha256) kubectl" | sha256sum --check

  • sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

  • kubectl version --client --output=yaml

image

3. Install Minikube

  • curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb sudo dpkg -i minikube_latest_amd64.deb

  • sudo dpkg -i minikube_latest_amd64.deb

  • minikube start

image

image

If you want to try an alternative way, you can check this.

Let's understand the concept of pod

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 that are relatively tightly coupled.

You can read more about Pod from here.

Task-02:

Create your first pod on Kubernetes through minikube.

image

image

We are suggesting you make an Nginx pod, but you can always show your creativity and do it on your own.

Happy Learning :)

Day 31 task is completed!

90DaysOfDevOps Tasks👇

github.com/Chaitannyaa/90DaysOfDevOps.git

Chaitannyaa Gaikwad | LinkedIn