๐Launching Your First Kubernetes Cluster with Kind & Nginx
Creating a Kubernetes Cluster Using Kind & creating Nginx pod

๐จโ๐ป Last-year student diving deep into DevOps, Cloud Engineering, and Infrastructure Automation. Passionate about building scalable, efficient, and secure systems. Letโs connect and build something amazing! ๐
Let's take it a step further with hands-on practice by setting up a Kubernetes cluster using Kind (Kubernetes in Docker) and creating Nginx pod as our first pod! ๐
๐ What is Kind?
Kind (Kubernetes in Docker) is a lightweight tool that lets you quickly create Kubernetes clusters inside Docker containers. It's a great alternative to Minikube for local development, testing, and CI/CD pipelines.
โจ Features of Kind:
โ
Runs Kubernetes inside Docker ๐ณ
โ
Lightweight & fast ๐
โ
Supports multiple Kubernetes versions
โ
Works on Linux, macOS, and Windows
โ
Perfect for testing Kubernetes workloads locally
๐ ๏ธ Task-01: Install Kind
๐น First, install Kind by following the official guide: Kind Installation.
๐น Ensure Docker is installed before proceeding.
โ Create a Kind Cluster
Once installed, create a Kubernetes cluster using:
kind create cluster --name my-cluster
To verify, run:
kubectl cluster-info --context kind-my-cluster
๐น Understanding Kubernetes Pods
๐ค What is a Pod?
A Pod is the smallest deployable unit in Kubernetes. It consists of:
One or more containers ๐ณ
Shared storage & network
A specification defining how to run the containers
A Pod acts as a "logical host", ensuring all its containers run together efficiently.
๐ ๏ธ Task-02: Create a Pod Definition (nginx-pod.yaml)
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
labels:
app: nginx
spec:
containers:
- name: nginx-container
image: nginx:latest
ports:
- containerPort: 80
๐ Explanation:
apiVersion: v1โ Uses v1 API for Kubernetes objects.kind: Podโ Defines this as a Pod resource.metadata:name: nginx-podโ Assigns a name to the Pod.labels: app: nginxโ Adds a label for easy identification.
spec:containersโ Lists the containers within the pod.name: nginx-containerโ Names the container inside the pod.image: nginx:latestโ Uses the latest Nginx Docker image.ports: containerPort: 80โ Exposes port 80 for web traffic (HTTP).
โ Apply the YAML file
kubectl apply -f nginx-pod.yaml
Check if the Pod is running:
kubectl get pods

๐ Congrats! You've successfully created an Nginx Pod.




