DevOps Tools
Kubernetes Explained Simply: No Jargon Guide
Kubernetes is a system that runs your applications across multiple servers and makes sure they stay running. If a server goes down, Kubernetes moves your application to a healthy server. If traffic spikes, Kubernetes starts more copies of your application. If you deploy a new version, Kubernetes rolls it out gradually so users never see downtime.
That is Kubernetes in three sentences. Everything else is details.
The problem is that most Kubernetes explanations drown you in jargon before you understand the basic idea. This guide takes the opposite approach. Real-world analogies first. Technical details second. Jargon only when you already understand the concept it describes.
The shipping port analogy
Imagine a massive shipping port. Thousands of containers arrive on ships, and they need to be:
- Sorted -- each container goes to the right destination
- Stored -- placed on the correct dock area
- Monitored -- checked to make sure they haven't been damaged
- Replaced -- if one is damaged, a new one is ordered immediately
- Scaled -- during peak season, more dock space is allocated
A human port manager would struggle to handle all of this manually. So shipping ports use management systems that track every container, automate placement, and handle problems automatically.
Kubernetes is that management system -- for software containers instead of shipping containers.
In this analogy:
- The port is your Kubernetes cluster (the group of servers)
- The ships are your deployments (instructions for what to run)
- The shipping containers are your pods (the actual running applications)
- The dock workers are the nodes (the individual servers doing the work)
- The port manager is the control plane (the brain that makes decisions)
Every Kubernetes concept maps to something in this analogy. Let us walk through each one.
Pods: the smallest unit
A pod is one or more containers that run together on the same server. In most cases, a pod is just one container -- one running copy of your application.
Analogy: A pod is a single shipping container. It holds one thing (your application), it can be moved between ships (servers), and it has a unique tracking number (IP address).
apiVersion: v1
kind: Pod
metadata:
name: my-web-app
spec:
containers:
name: web
image: my-company/web-app:1.0
ports:
containerPort: 8080
This says: "Run one copy of my web application, version 1.0, listening on port 8080."
You rarely create pods directly. Instead, you create Deployments, which manage pods for you.
Key point: Pods are temporary. They can be created, destroyed, and recreated at any time. Kubernetes treats them as disposable. Your application should be designed to handle this -- no storing important data inside a pod.
Deployments: the desired state
A Deployment tells Kubernetes: "I want X copies of this application running at all times." Kubernetes then makes it happen. If a copy crashes, Kubernetes starts a new one. If a server goes down, Kubernetes moves the affected copies to healthy servers.
Analogy: A Deployment is a standing order at the port: "I always need five containers of product X on the dock. If any get damaged, replace them immediately."
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-app
spec:
replicas: 3
selector:
matchLabels:
app: web-app
template:
metadata:
labels:
app: web-app
spec:
containers:
name: web
image: my-company/web-app:1.0
ports:
containerPort: 8080
resources:
requests:
memory: "128Mi"
cpu: "250m"
limits:
memory: "256Mi"
cpu: "500m"
This says: "Run three copies of my web application. Each copy needs at least 128MB of memory and 0.25 CPU cores. Never let a single copy use more than 256MB or 0.5 CPU cores."
The replicas: 3 line is the magic. It means:
- Kubernetes starts three pods
- If one crashes, Kubernetes starts a replacement within seconds
- If you change the number to 5, Kubernetes starts two more
- If you change it to 1, Kubernetes stops two
This is declarative configuration. You declare what you want. Kubernetes figures out how to make it happen. You never say "start a pod" or "stop a pod." You say "I want three pods" and Kubernetes handles the rest.
Services: finding your application
Your application is running in three pods. Each pod has its own IP address. But those addresses change every time a pod restarts. How does anything connect to your application?
A Service gives your pods a stable address. It sits in front of your pods and routes traffic to whichever pods are currently healthy.
Analogy: A Service is the dock number at the port. Shipping containers come and go, but dock number 7 is always dock number 7. Anyone who needs your containers goes to dock 7, and the port directs them to the right container.
apiVersion: v1
kind: Service
metadata:
name: web-app-service
spec:
selector:
app: web-app
ports:
port: 80
targetPort: 8080
type: ClusterIP
This says: "Create a stable address called web-app-service. Route any traffic on port 80 to the pods labelled app: web-app on their port 8080."
Now, instead of tracking individual pod IPs, other parts of your system just connect to web-app-service. Kubernetes handles the routing.
There are three types of Service:
- ClusterIP -- accessible only within the cluster (default, for internal communication)
- NodePort -- accessible on a specific port on every server (useful for testing)
- LoadBalancer -- creates an external load balancer (for production traffic from the internet)
Ingress: the front door
A Service makes your application reachable, but Ingress controls how external traffic gets in. It is the front door of your cluster.
Analogy: Ingress is the port's main gate. It checks who is arriving, directs them to the right dock based on their paperwork, and handles security checks. One gate serves the entire port, routing visitors to different areas.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: web-ingress
spec:
rules:
host: app.example.com
http:
paths:
path: /
pathType: Prefix
backend:
service:
name: web-app-service
port:
number: 80
path: /api
pathType: Prefix
backend:
service:
name: api-service
port:
number: 80
This says: "When someone visits app.example.com, send them to the web app. When they visit app.example.com/api, send them to the API service."
One Ingress can route traffic to dozens of different services based on the URL path or hostname. This is how real production systems work -- one entry point, many services behind it.
Namespaces: organising the port
Namespaces divide your cluster into logical sections. Different teams or environments can share the same cluster without interfering with each other.
Analogy: Namespaces are different sections of the port. Section A handles electronics. Section B handles food. Each section has its own dock numbers and its own staff, but they share the same port infrastructure.
kubectl create namespace development
kubectl create namespace production
You might run your development environment in one namespace and your production environment in another -- on the same cluster. Resources in one namespace cannot accidentally affect resources in another.
ConfigMaps and Secrets: settings and passwords
Applications need configuration: database addresses, feature flags, API keys. ConfigMaps and Secrets let you store this configuration outside your container image.
Analogy: ConfigMaps are the labels on a shipping container -- "fragile," "this side up," "deliver to dock 7." Secrets are the locked documents inside the container -- customs forms, manifests, security codes.
apiVersion: v1
kind: ConfigMap
metadata:
name: app-config
data:
DATABASE_HOST: "db.example.com"
LOG_LEVEL: "info"
apiVersion: v1
kind: Secret
metadata:
name: app-secrets
type: Opaque
data:
DATABASE_PASSWORD: cGFzc3dvcmQxMjM= # base64 encoded
Your pods read these values as environment variables or files. When you need to change configuration, you update the ConfigMap or Secret -- not the container image.
When you need Kubernetes
Kubernetes is powerful, but it is also complex. It is not the right tool for everything. Here is a clear decision framework:
You probably need Kubernetes when:
- You run multiple microservices that need to communicate with each other
- You need zero-downtime deployments for customer-facing applications
- Your traffic is unpredictable and you need automatic scaling
- You run services across multiple servers or availability zones
- Multiple teams deploy different applications to shared infrastructure
- You need self-healing -- automatic restarts and failover
You probably do not need Kubernetes when:
- You have a single application that runs comfortably on one server
- Your team is fewer than five engineers and you are not scaling
- Your application is a static website or a simple API
- You are building a prototype or MVP -- get it working first, optimise later
- Managed services (AWS ECS, Google Cloud Run, serverless) solve your problem more simply
The mistake many teams make is adopting Kubernetes too early. If your application runs on one server and you have two engineers, Kubernetes adds complexity without proportional benefit. Docker Compose or a managed container service is a better starting point.
For a deeper comparison of container tools, see Docker vs Kubernetes.
Kubernetes vs Docker Compose
This is the most common question beginners ask: "I already know Docker Compose. Why do I need Kubernetes?"
| Feature | Docker Compose | Kubernetes |
|---|---|---|
| Number of servers | Single machine | Many machines |
| Self-healing | No | Yes -- restarts failed pods automatically |
| Auto-scaling | No | Yes -- scales based on CPU, memory, or custom metrics |
| Load balancing | Basic (round-robin) | Advanced (with Ingress controllers) |
| Rolling updates | Limited | Built-in with zero downtime |
| Complexity | Low | High |
| Best for | Development, small projects | Production, scale, multi-team |
Docker Compose is a development tool. Kubernetes is a production platform. Most teams use Docker Compose locally and Kubernetes in production. They complement each other rather than compete.
Getting started with minikube
Minikube runs a single-node Kubernetes cluster on your laptop. It is the best way to learn without cloud costs.
Install minikube
# macOS
brew install minikube
# Linux
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
Start a cluster
minikube start
This creates a local Kubernetes cluster. It takes a minute or two the first time.
Deploy your first application
# Create a deployment
kubectl create deployment hello-app --image=gcr.io/google-samples/hello-app:1.0
# Expose it as a service
kubectl expose deployment hello-app --type=NodePort --port=8080
# Open it in your browser
minikube service hello-app
Three commands. You now have an application running in Kubernetes with a service routing traffic to it.
Explore what Kubernetes created
# See your pods
kubectl get pods
# See your deployments
kubectl get deployments
# See your services
kubectl get services
# See detailed information about a pod
kubectl describe pod <pod-name>
# See logs from a pod
kubectl logs <pod-name>
These commands are how you interact with Kubernetes daily. kubectl is to Kubernetes what git is to version control -- the essential CLI tool.
Scale your application
# Scale to 5 replicas
kubectl scale deployment hello-app --replicas=5
# Watch the pods start
kubectl get pods --watch
Within seconds, Kubernetes starts four more copies of your application. Scale it back down to one:
kubectl scale deployment hello-app --replicas=1
Kubernetes stops four pods. This is the core of what makes Kubernetes valuable: you declare the desired state, and Kubernetes makes it happen.
The essential kubectl commands
| Command | What it does |
|---|---|
kubectl get pods | List all running pods |
kubectl get deployments | List all deployments |
kubectl get services | List all services |
kubectl describe pod <name> | Detailed information about a pod |
kubectl logs <pod-name> | View logs from a pod |
kubectl exec -it <pod-name> -- /bin/sh | Open a shell inside a pod |
kubectl apply -f file.yaml | Create or update resources from a file |
kubectl delete -f file.yaml | Delete resources defined in a file |
kubectl scale deployment <name> --replicas=N | Change the number of replicas |
Where to go from here
Kubernetes is a deep topic. This guide covers the foundational concepts. The next steps:
- Helm -- A package manager for Kubernetes. Lets you install complex applications with one command.
- Persistent storage -- How to give your pods access to data that survives restarts.
- RBAC -- Role-based access control for multi-team clusters.
- Horizontal Pod Autoscaler -- Automatic scaling based on CPU or custom metrics.
- Monitoring -- Prometheus and Grafana for observability.
Our Kubernetes guide for beginners covers the full learning path in detail. Kubernetes is also a core component of the DevOps tools landscape and an essential skill for anyone pursuing a cloud engineering career.
The best way to learn is to build. Start with minikube, deploy a real application, break something, debug it, and fix it. Every Kubernetes engineer learned by troubleshooting failing pods at some point. That is where the real understanding develops.
Frequently Asked Questions
Ola
Founder, CloudPros
Building the most hands-on DevOps bootcamp for the AI era. 16 weeks of real infrastructure, real projects, real career outcomes.
