Skip to main content
In this lesson we cover Kubernetes Deployments — the higher-level API for running applications in production. Deployments manage ReplicaSets, which in turn manage Pods, and provide the following production-ready features:
  • Multiple instances of a service for availability and load distribution.
  • Declarative, seamless updates (rolling updates) so not all Pods are replaced at once.
  • Easy rollbacks to previous revisions when a rollout fails.
  • Pause/resume support to batch multiple changes (e.g., image update, scaling, resource adjustments) into a single rollout.
Kubernetes Deployments sit above ReplicaSets: a Deployment creates and manages a ReplicaSet, and that ReplicaSet manages Pods. Together they give you declarative updates, controlled rollouts, rollbacks, and pause/resume behavior.
A stylized diagram of a Kubernetes Deployment and ReplicaSet showing a cloud with two container versions (v1 and v2) above and a ReplicaSet managing multiple pods below. Each pod displays a Python logo and there are icons representing deployment/rollout actions.
Key configuration points for a Deployment manifest:
  • spec.replicas — declares how many Pod replicas you want.
  • spec.selector.matchLabels — must match the labels in spec.template.metadata.labels. This selector tells the Deployment which Pods belong to it and is required for apps/v1 Deployments.
Minimal Deployment manifest example:
Create the Deployment:
Verify the Deployment, its ReplicaSet, and Pods:
Always ensure spec.selector.matchLabels matches the labels on spec.template.metadata.labels. If they don’t match, the Deployment cannot correctly identify and manage its Pods.
To list all objects in the current namespace at once:
Common Deployment operations and commands: For more details on strategies and rollout behavior, see the Kubernetes documentation on Deployments and rolling updates: We will next cover how to perform rolling updates (change the image in the Deployment), how to roll back to previous revisions, and how to pause/resume rollouts to group multiple changes together.

Watch Video