Day 31 – Launching My First Kubernetes Cluster with Nginx

Day 31 – Launching My First Kubernetes Cluster with Nginx

Today marks Day 31 of my 90DaysOfDevOps challenge, and it’s time to dive into something incredibly exciting—Kubernetes hands-on practice. In the previous task, I explored the architecture of Kubernetes, and today, the mission is to launch my first Kubernetes cluster using Minikube and deploy Nginx.

I'll go ahead and walk you through my experience.


Step 1: Understanding Minikube

Before jumping into the setup, I took a moment to understand what Minikube is and why it’s so useful.

Minikube is essentially a lightweight tool that lets you set up a local Kubernetes cluster on your machine. It’s perfect for developers and learners like me because:

  • It’s easy to install and works on Linux, macOS, and Windows.
  • It supports multiple container runtimes like Docker, containerd, and CRI-O.
  • It comes with cool features like addons, LoadBalancer support, and blazing-fast image builds.

Think of Minikube as a mini version of Kubernetes that lets you explore and experiment without setting up a full-fledged cluster in the cloud.


Step 2: Installing Minikube

Installing Minikube was pretty straightforward. Here’s what I did:

  1. Headed over to the official Minikube installation page.
  2. Followed the instructions specific to my OS (Linux).
  3. Verified the installation by running:

That’s it! Minikube was up and running on my local machine.


Step 3: Understanding Pods

Now, before deploying anything, I needed to understand the concept of Pods.

  • Pods are the smallest deployable unit in Kubernetes.
  • They can house one or more containers, and these containers share resources like storage, network, and environment configurations.
  • Think of a pod as a logical host for your tightly coupled application containers.


Step 4: Creating My First Pod (Nginx)

This was the most thrilling part of today’s task—deploying my first pod. I decided to create an Nginx pod, as suggested. Here’s how I did it:

  1. Started Minikube:

2. Created a simple YAML file for the Nginx pod:

3. Applied the YAML file to my Kubernetes cluster:

4. Verified the pod status:

Seeing the Nginx pod up and running was such a satisfying moment!


Challenges I Faced

No DevOps task is complete without its share of hurdles. Here are a few hiccups I encountered:

  1. My Kubernetes version didn’t match Minikube’s requirements initially, so I had to upgrade.
  2. I missed enabling the Nginx Ingress Addon the first time, which caused some confusion when trying to access Nginx.

But hey, debugging is part of the journey, and I learned so much while fixing these issues!


What’s Next?

Now that I’ve successfully created a pod, here are my next steps:

  1. Explore services in Kubernetes to expose my Nginx pod to the outside world.
  2. Dive deeper into ReplicaSets and Deployments for scaling applications.
  3. Experiment with more complex multi-container pods and configurations.


Final Thoughts

Today’s task was a fantastic way to get hands-on with Kubernetes. Minikube makes the process so accessible, and deploying that first Nginx pod felt like a major win in my DevOps journey.

If you’re just starting out with Kubernetes, I’d highly recommend giving Minikube a try. The learning curve is steep, but the rewards are absolutely worth it.

Stay tuned for more updates as I continue my 90DaysOfDevOps challenge!


Summary: Day 31 – Launching My First Kubernetes Cluster

Today’s DevOps adventure was all about taking Kubernetes from theory to practice! After understanding Kubernetes architecture, I dove into the hands-on task of setting up my first cluster using Minikube.

Here’s what went down:

  • Installed Minikube, a lightweight tool to create a local Kubernetes cluster.
  • Learned about pods, the smallest deployable unit in Kubernetes, which can run one or more containers.
  • Deployed my first pod using Nginx, and seeing it run felt like a huge win!

Of course, there were a few hiccups along the way, like mismatched Kubernetes versions and enabling the right addons, but solving those challenges made the experience even more rewarding.

Next up? Exploring services, ReplicaSets, and Deployments to scale and expose my applications.

Kubernetes might seem overwhelming at first, but trust me, with tools like Minikube, it’s not just manageable—it’s exciting! Let’s keep pushing forward in this 90DaysOfDevOps challenge!


Sven Batista Steinbach

CEO @ Syself.com | Easy, Production-ready & Reliable Kubernetes Platform - Use Kubernetes, don't manage!

3 个月

Shubham Niranjan very cool your journey so far ?? If you want to try it out on real infra you might consider Hetzner Cloud GmbH they are currently the world's #1 cost effective solution. With https://github.com/syself/cluster-api-provider-hetzner you can spin up Kubernetes clusters and manage them with Kubernetes ??

回复
Mangesh Gajbhiye

10k+| Member of Global Remote Team| Building Tech & Product Team| AWS Cloud (Certified Architect)| DevSecOps| Kubernetes (CKA)| Terraform ( Certified)| Jenkins| Python| GO| Linux| Cloud Security| Docker| Azure| Ansible

3 个月

Very helpful Shubham Niranjan Let's connect??!

要查看或添加评论,请登录

Shubham Niranjan的更多文章

社区洞察

其他会员也浏览了