DEV Community

Cover image for ๐Ÿš€ Day 10 of My Cloud Journey: Setting Up Kubernetes with Kind & kubectl on AWS EC2
Avinash wagh
Avinash wagh

Posted on

๐Ÿš€ Day 10 of My Cloud Journey: Setting Up Kubernetes with Kind & kubectl on AWS EC2

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/
Enter fullscreen mode Exit fullscreen mode

๐Ÿ”น Verify:

kubectl version --client
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

๐Ÿ”น Verify:

kind --version
Enter fullscreen mode Exit fullscreen mode

๐Ÿš€ Creating My First Kubernetes Cluster

Once both tools were installed, I created my first cluster:

kind create cluster
Enter fullscreen mode Exit fullscreen mode

โณ It took a couple of minutes to set up everything automatically.


โœ… Verifying the Cluster

kubectl get nodes
Enter fullscreen mode Exit fullscreen mode

Output:

kind-control-plane   Ready   control-plane
Enter fullscreen mode Exit fullscreen mode

โœ”๏ธ 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
Enter fullscreen mode Exit fullscreen mode

Check resources:

kubectl get pods
kubectl get svc
Enter fullscreen mode Exit fullscreen mode

๐ŸŒ Accessing the Application

Since I'm using EC2, I used port forwarding:

kubectl port-forward service/nginx 8080:80
Enter fullscreen mode Exit fullscreen mode

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)