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

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

Β·

2 min read

Awesome! You learned the architecture of one of the top most important tools "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 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

.

make sure you choose t2.medium for master nodes

sudo apt-get update

sudo apt-get install docker.io -y

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 sudo install minikube-linux-amd64 /usr/local/bin/minikube

Task-02:

Create your first pod on Kubernetes through minikube

minikube start

and when this type of error is coming then don't worry

use thisπŸ‘‡πŸ‘‡πŸ‘‡

minikube start --driver=docker

sudo usermod -aG docker $USER && newgrp docker

minikube start --driver=docker

docker ps

minikube ssh (inside the minikube)

docker ps

exit

sudo snap install kubectl --classic

kubectl create namespace react-django-app

your image is already pushed in the docker hub(If you do not know how to push images in Docker Hub, then read my Docker articles, and you will understand.)

mkdir kubernetes-project

Create a pod2.yaml file

kubectl apply -f pod2.yaml

kubectl get pods --namespace=react-django-app

minikube ssh

docker ps

Thank you for reading this blog. Hope it helps.

β€” Safia Khatoon

Happy Learning :)

Β