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)