Join our Discord Server
Tanvir Kour Tanvir Kour is a passionate technical blogger and open source enthusiast. She is a graduate in Computer Science and Engineering and has 4 years of experience in providing IT solutions. She is well-versed with Linux, Docker and Cloud-Native application. You can connect to her via Twitter https://x.com/tanvirkour

Getting Started With Kubernetes

2 min read

Kubernetes conversations this week span everything from managed-service comparisons and storage volumes to scheduler research and key-management integrations. With so much happening in the ecosystem, it is easy to forget that most engineers are still climbing the same first hill: getting a working cluster, deploying an app, and understanding what actually happens under the hood. This tutorial walks through that first hill step by step, using nothing but a laptop, a terminal, and about thirty minutes of your time.

What Is Kubernetes, Really?

Kubernetes is an open-source system for automating the deployment, scaling, and management of containerized applications. Instead of manually starting containers on individual machines, you describe the desired state of your application in a declarative manifest, and Kubernetes continuously works to make reality match that description. If a container crashes, Kubernetes restarts it. If traffic increases, Kubernetes can scale your app out. If a node fails, Kubernetes reschedules the workload elsewhere.

Prerequisites

  • A Mac, Linux, or Windows machine with at least 4GB of free RAM
  • Docker Desktop or another container runtime installed
  • Basic comfort with the command line

Step 1: Install kubectl

kubectl is the command-line tool used to interact with any Kubernetes cluster.

brew install kubectl
kubectl version --client

Step 2: Spin Up a Local Cluster With Minikube

Minikube creates a single-node Kubernetes cluster inside a virtual machine or container on your local machine, which is perfect for learning.

brew install minikube
minikube start --driver=docker
kubectl get nodes

You should see a single node listed with a status of Ready.

Step 3: Deploy Your First Application

Let’s deploy a simple nginx web server using a Deployment object.

kubectl create deployment hello-k8s --image=nginx:latest
kubectl get deployments
kubectl get pods

Kubernetes pulls the nginx image and schedules a pod to run it. Within a few seconds the pod status should change to Running.

Step 4: Expose the App With a Service

Pods are ephemeral and get new IP addresses whenever they restart, so we expose the deployment through a stable Service instead.

kubectl expose deployment hello-k8s --type=NodePort --port=80
minikube service hello-k8s --url

Open the returned URL in your browser and you should see the default nginx welcome page.

Step 5: Scale Your Deployment

One of Kubernetes’ biggest selling points is trivial horizontal scaling.

kubectl scale deployment hello-k8s --replicas=4
kubectl get pods -o wide

You now have four identical pods running behind the same Service, each ready to share incoming traffic.

Step 6: Inspect Logs and Debug

kubectl logs deployment/hello-k8s
kubectl describe pod <pod-name>
kubectl exec -it <pod-name> -- /bin/bash

These three commands cover the vast majority of everyday troubleshooting: reading logs, inspecting events, and shelling into a running container.

Step 7: A Quick Look at Persistent Volumes

Containers are stateless by default, so any data written inside them disappears when the pod is rescheduled. Kubernetes solves this with PersistentVolume and PersistentVolumeClaim objects, which decouple storage from the pod lifecycle.

kubectl apply -f - <<EOF
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: demo-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
EOF
kubectl get pvc

Once bound, this claim can be mounted into any pod so that data survives restarts and rescheduling.

Step 8: Clean Up

kubectl delete service hello-k8s
kubectl delete deployment hello-k8s
kubectl delete pvc demo-pvc
minikube stop

Where to Go From Here

From here, natural next steps include exploring Helm for packaging applications, learning about GitOps tools such as ArgoCD for automated deployments, and comparing managed offerings like EKS and AKS once you are ready to move beyond your laptop. Kubernetes rewards hands-on repetition more than passive reading, so keep a scratch cluster running and rebuild these steps from memory a few times until they feel natural.

Have Queries? Join https://launchpass.com/collabnix

Tanvir Kour Tanvir Kour is a passionate technical blogger and open source enthusiast. She is a graduate in Computer Science and Engineering and has 4 years of experience in providing IT solutions. She is well-versed with Linux, Docker and Cloud-Native application. You can connect to her via Twitter https://x.com/tanvirkour

Kueue on Kubernetes: GPU Job Queueing and Fair-Share Quotas…

The default Kubernetes scheduler has no idea your GPUs are shared between teams. This hands-on lab uses Kueue to add job level admission, per...
Ajeet Raina
7 min read

Kyverno 1.19 Deprecates ClusterPolicy: A Hands-On Guide to CEL…

Kyverno 1.19 deprecated ClusterPolicy and Policy, with removal coming in v1.20. This hands-on lab covers the new CEL based ValidatingPolicy and MutatingPolicy types, a...
Ajeet Raina
8 min read

Ingress-NGINX Is Retired: A Hands-On Migration to Gateway API…

Ingress-NGINX maintenance ended in March 2026. This hands-on lab walks through converting your Ingress resources with ingress2gateway 1.0 and serving the same traffic through...
Ajeet Raina
8 min read
Join our Discord Server