# Kubernetes Deployment

> A Kubernetes Deployment keeps a desired number of identical pods running and updates them with rolling updates and rollbacks through ReplicaSets.

- Source: https://www.itwonderlab.com/kubernetes-deployment/
- Published: 2026-06-15
- Updated: 2026-06-15
- Author: Javier Ruiz Jiménez (https://www.javierruizjimenez.com/)
- Site: IT Wonder Lab (https://www.itwonderlab.com/)

---

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](https://www.itwonderlab.com/kubernetes/).

### Key concepts

- **ReplicaSet**: keeps N pods running, owned by the Deployment.
- **Strategy**: `RollingUpdate` (`maxSurge`, `maxUnavailable`) or `Recreate`.
- **Rollout commands**: `kubectl rollout status|history|undo|restart`.
- **Related**: StatefulSet for databases, DaemonSet for one pod per node, [HPA](https://www.itwonderlab.com/horizontal-pod-autoscaler/) to scale.

### Learn it

Follow [Pods and Deployments](https://www.itwonderlab.com/kubernetes-deployments-pods-rolling-updates/).
