After getting hands-on with Docker, the next natural step in my journey was Kubernetes โ the backbone of modern container orchestration.
Today, I took my first step into Kubernetes by setting up a cluster using Kind and kubectl on an AWS EC2 instance โ๏ธ
๐งฉ Why Kubernetes?
While Docker helps us run containers, managing multiple containers across environments becomes complex.
๐ Thatโs where Kubernetes comes in:
- Automates deployment and scaling
- Ensures high availability
- Manages container lifecycle efficiently
This is exactly what real-world systems use in production.
โ๏ธ My Setup (AWS EC2)
Instead of using local machine, I chose AWS EC2 to simulate a real-world environment.
๐น Why EC2?
- Closer to production setup
- Better for remote access and testing
- Helps understand cloud infrastructure
๐ ๏ธ Tools I Installed
1. kubectl (Kubernetes CLI)
kubectl is the command-line tool used to interact with Kubernetes clusters.
๐น Install latest version:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
๐น Verify:
kubectl version --client
2. Kind (Kubernetes in Docker)
Kind allows us to run Kubernetes clusters inside Docker containers.
๐น Install stable version:
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.31.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
๐น Verify:
kind --version
๐ Creating My First Kubernetes Cluster
Once both tools were installed, I created my first cluster:
kind create cluster
โณ It took a couple of minutes to set up everything automatically.
โ Verifying the Cluster
kubectl get nodes
Output:
kind-control-plane Ready control-plane
โ๏ธ My Kubernetes cluster is now up and running!
๐ฅ First Deployment (Nginx)
To test everything, I deployed a simple Nginx application:
kubectl create deployment nginx --image=nginx
kubectl expose deployment nginx --type=NodePort --port=80
Check resources:
kubectl get pods
kubectl get svc
๐ Accessing the Application
Since I'm using EC2, I used port forwarding:
kubectl port-forward service/nginx 8080:80
Now accessible via:
๐ http://:8080
๐ก Key Takeaways
- kubectl is used to interact with Kubernetes
- Kind makes it easy to run local clusters using Docker
- Kubernetes abstracts infrastructure and manages containers efficiently
- Setting up on EC2 gives a more real-world experience
๐ My Learning Reflection
Todayโs learning shifted my mindset from:
๐ โRunning containers with Dockerโ
to
๐ โOrchestrating containers using Kubernetesโ
This feels like a big step toward becoming a Cloud/DevOps Engineer ๐
๐ Learning in Public
Iโm documenting my journey as I transition from .NET Developer to Cloud Engineer.
๐ LinkedIn โ https://www.linkedin.com/in/avinashwagh-
๐ GitHub โ https://github.com/Avinash8600
๐ฌ Letโs Connect
If you're learning Kubernetes, DevOps, or Cloud โ letโs grow together ๐
Would love feedback, suggestions, or tips from the community!
Top comments (0)