DEV Community

Jayanth Dasari
Jayanth Dasari

Posted on

Day-26 My First Steps into Kubernetes: From Installation to Running Pods

My First Kubernetes Cluster Experience
Conversation with Gemini
Write me a single blog post

I installed kubectl

I installed minikube

Created my first single node kubernetes cluster

Created a pod and ran it

Used kubectl describe pod (podname)

Used kubectl logs (podname)

And many other cmds like minikube start,delete,

Kubectl create apply

Also append my linked at the bottom

Here is a draft for your blog post. I’ve structured it to flow like a tutorial/learning log, which works great for tech blogs on platforms like Medium or Dev.to.

My First Steps into Kubernetes: From Installation to Running Pods
As I continue my journey into Cloud Computing and DevOps, I recently took the plunge into Kubernetes (K8s). We often hear about how complex Kubernetes is, but getting a simple local environment up and running was a rewarding experience.

Here is a quick walkthrough of how I set up my first single-node cluster and ran my first Pod.

  1. Setting the Stage: Installation Before doing anything, I needed the command-line tools to interact with the cluster and a local Kubernetes engine.

kubectl: The command-line tool for Kubernetes.

Minikube: A tool that runs a single-node Kubernetes cluster inside a virtual machine (or Docker container) on your laptop.

Once those were installed, I was ready to go.

  1. Spinning Up the Cluster The magic command to get everything started was:
minikube start
Enter fullscreen mode Exit fullscreen mode

This command provisioned a single-node cluster on my local machine. It felt great to see the "Done! kubectl is now configured..." message.

  1. Creating My First Pod With the cluster running, it was time to deploy an application. I didn't just want to read about it; I wanted to see it run. I used a simple YAML configuration (or the CLI) to create a pod.
kubectl apply -f pod.yaml
# OR using the imperative command
kubectl run my-first-pod --image=nginx

Enter fullscreen mode Exit fullscreen mode
  1. Inspecting the Workload Once the pod was up, I wanted to see what was happening "under the hood." I used two crucial commands:

Describing the Pod: To check the details, events, and status of the pod, I used:


kubectl describe pod my-first-pod
Enter fullscreen mode Exit fullscreen mode

This gave me a detailed breakdown of the pulling of the image, the container creation, and the successful start.

Checking Logs: To verify the application was actually handling requests or running correctly, I checked the standard output using:

kubectl logs my-first-pod
Enter fullscreen mode Exit fullscreen mode
  1. Cleaning Up After testing, it’s important to know how to tear things down to save resources. I learned to delete specific resources and eventually stop the cluster entirely

# Deleting the pod
kubectl delete pod my-first-pod

# Stopping and deleting the local cluster
minikube delete
Enter fullscreen mode Exit fullscreen mode

Key Takeaways
This exercise gave me hands-on experience with the core K8s workflow: Create -> Inspect -> Debug -> Delete. I'm looking forward to diving deeper into concepts like ReplicaSets, Deployments, and Services next!

Linkedin: https://www.linkedin.com/in/dasari-jayanth-b32ab9367/

Top comments (0)