Day 31 Task: Launching your First Kubernetes Cluster with Nginx running - 90DaysOfDevOps
- 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.
- 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.
For installation on Ubuntu, you can follow the below steps :
What you’ll need
2 CPUs or more
2GB of free memory
20GB of free disk space
Internet connection
Docker and Ubuntu user with docker permission to run commands
Run the below commands -
sudo apt update
sudo apt install docker.io -y
sudo usermod -aG docker $USER
sudo reboot
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube start
sudo snap install kubectl --classic
Let's understand the concept of 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 that are relatively tightly coupled.
You can read more about Pod here.
Task-02:
Create your first pod on Kubernetes through minikube.
Creating a pod yaml file as below -
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
Execute the below command to run the pod -
kubectl apply -f nginx-pod.yml
Thank you :)