Kubernetes (K8s) is the platform that runs most of the world's containerized production workloads. Netflix, Google, Airbnb, LinkedIn — they all run on Kubernetes. It is complex, but it solves real problems: automatically restarting failed containers, distributing load across many servers, rolling out updates without downtime, and scaling up or down based on traffic. This part gives you a practical foundation.
Docker alone runs containers on a single machine. Kubernetes orchestrates containers across a cluster of machines. When you deploy to Kubernetes, you tell it what you want — "I want 5 replicas of this container, always running, with 512MB memory each" — and Kubernetes makes it happen. If a node (server) crashes, Kubernetes reschedules the containers on healthy nodes. If a container crashes, Kubernetes restarts it. It manages the complexity so you can focus on your application.
# Linux
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/
# Verify
kubectl version --client
# For local development: install minikube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
chmod +x minikube-linux-amd64
sudo mv minikube-linux-amd64 /usr/local/bin/minikube
minikube start
# Get cluster info
kubectl cluster-info
kubectl get nodes
# Work with pods
kubectl get pods
kubectl get pods -n kube-system # in a specific namespace
kubectl describe pod pod-name
kubectl logs pod-name
kubectl logs -f pod-name # follow logs
kubectl exec -it pod-name -- bash # enter pod shell
# Work with deployments
kubectl get deployments
kubectl describe deployment my-app
# Work with services
kubectl get services
kubectl get all # everything in default namespace
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
labels:
app: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-app
image: yourusername/my-app:v1.0.0
ports:
- containerPort: 5000
resources:
requests:
memory: "128Mi"
cpu: "250m"
limits:
memory: "256Mi"
cpu: "500m"
readinessProbe:
httpGet:
path: /health
port: 5000
initialDelaySeconds: 10
periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
name: my-app-service
spec:
selector:
app: my-app
ports:
- port: 80
targetPort: 5000
type: LoadBalancer
# Apply the configuration
kubectl apply -f deployment.yml
# Scale deployment
kubectl scale deployment my-app --replicas=5
# Rolling update (update image)
kubectl set image deployment/my-app my-app=yourusername/my-app:v2.0.0
# Watch rollout progress
kubectl rollout status deployment/my-app
# Rollback if something goes wrong
kubectl rollout undo deployment/my-app
In Part 11, we will cover cloud platforms — AWS, GCP, and Azure fundamentals that every DevOps engineer needs to navigate modern infrastructure.
Kubernetes manages containerized applications through a set of declarative objects defined in YAML files. Understanding the core objects is the foundation of Kubernetes work. A Pod is the smallest deployable unit — one or more containers that share network and storage. Pods are ephemeral; do not create them directly. A Deployment manages a set of identical Pod replicas, handles rolling updates, and automatically restarts failed Pods. A Service provides a stable network endpoint for a set of Pods — even as individual Pods are created and destroyed, the Service IP and DNS name remain constant. A ConfigMap stores non-sensitive configuration data as key-value pairs. A Secret stores sensitive data (encrypted at rest) like passwords and API keys. A PersistentVolumeClaim requests storage that outlives individual Pods.
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
replicas: 3
selector:
matchLabels:
app: myapp
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: myapp
image: myapp:1.0
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
Install minikube or kind to run a local Kubernetes cluster. Deploy a simple application: write a Deployment YAML for nginx with 3 replicas, a Service YAML of type NodePort to expose it, and apply both with kubectl apply -f. Verify the deployment with kubectl get pods, kubectl get deployments, and kubectl get services. Scale the deployment to 5 replicas with kubectl scale deployment myapp --replicas=5. Simulate a pod failure by deleting one pod and observe Kubernetes automatically creating a replacement.
DevOps is not a destination but a continuous journey of improvement. The practices covered here — automation, monitoring, infrastructure as code, CI/CD pipelines — are tools in service of a deeper goal: enabling teams to deliver software changes to production quickly, safely, and reliably. The measurement that matters is not which tools you use but how long it takes to go from a committed code change to running in production, and how confident you are in that process. The best DevOps teams measure their deployment frequency, lead time for changes, change failure rate, and mean time to recovery (the DORA metrics), and treat these as engineering objectives to improve over time.
Every topic in technology and finance rewards the learner who goes beyond surface understanding to build genuine fluency. Fluency comes from repeated exposure, application in varied contexts, and reflection on what worked and what did not. The concepts discussed here are starting points — each one opens into a deeper field of study that could occupy years of focused learning. The most effective approach is not to try to master everything at once, but to pick the areas most relevant to your current goals, go deep there, and then expand. Depth in a few areas is more valuable than shallow familiarity with many. Build on what you know, stay curious about what you do not, and keep the practice of learning as a consistent daily habit rather than an occasional burst of effort.
The questions that make learning stick: How does this connect to what I already know? Where would I actually use this? What would happen if I tried to explain this to someone who knows nothing about it? What are the edge cases and exceptions? What is still unclear? Asking these questions transforms passive reading into active learning, and active learning is what builds the kind of understanding that is still accessible years later when you need it under real conditions.