Kubernetes Deployment
A Deployment declares the pod template and the number of replicas. It creates a ReplicaSet, replaces pods gradually when the template changes (rolling update) and keeps old ReplicaSets so you can roll back. It is the usual way to run stateless apps in Kubernetes.
Key concepts #
- ReplicaSet: keeps N pods running, owned by the Deployment.
- Strategy:
RollingUpdate(maxSurge,maxUnavailable) orRecreate. - Rollout commands:
kubectl rollout status|history|undo|restart. - Related: StatefulSet for databases, DaemonSet for one pod per node, HPA to scale.
Learn it #
Follow Pods and Deployments.