Kubernetes (often shortened to "k8s") is a container orchestration system, originally designed by Google and now maintained by the open-source Cloud Native Computing Foundation (CNCF). It's the #5 most-used dev tool in the world, reported in roughly 28.5% of developer surveys, and it's the industry standard for running containers β typically Docker containers β reliably in production. Teams use it because it automatically deploys, scales, restarts, and load-balances applications across a cluster of machines, with no manual babysitting required.
A Kubernetes Deployment manifest declares how many copies (replicas) of a container should run, and Kubernetes keeps that number running automatically.
# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-app
image: my-app:latest
ports:
- containerPort: 3000
# apply the manifest to the cluster
kubectl apply -f deployment.yaml
# check the running pods
kubectl get pods
Run a lightweight local cluster with Minikube or kind to learn without needing a cloud account.
# install Minikube, then start a local cluster
minikube start
# confirm kubectl can talk to the cluster
kubectl get nodes