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.