Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Deployments

Direct answer

Deployments manage stateless pods through ReplicaSets, handling rolling updates, rollbacks with kubectl rollout undo, scaling and self-healing of failed pods.

When to use this

Use this when managing stateless apps with Deployments.

First 30 seconds

1. Deployments manage ReplicaSets with rolling updates.

2. Readiness probes gate rollout.

3. maxSurge/maxUnavailable.

4. Rollback with undo (or git revert in GitOps).

5. Record image digests.

Operational verification

new spec → rollout → ready pods → done

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Kubernetes declarative automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformKubernetes declarative automation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when managing stateless apps with Deployments.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

The negative fixture should deliberately exercise risks such as schema drift, selector overreach, admission rejection, controller lag, immutable fields, stale status and confusing created object with ready workload, choosing the cases most relevant to spec.selector/template identity, generation/observedGeneration, ReplicaSet rollout, readiness/availability conditions and rollback history.

Step 2 Example Narrow the fault
kubectl apply -f deploy.yaml
kubectl rollout status deploy/web
kubectl rollout undo deploy/web
Step 3 Common mistakes Narrow the fault
  • No readiness probe, so traffic hits pods that are not ready.
  • No resource requests/limits.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Deployments manage ReplicaSets and rolling updates.
  • kubectl rollout undo reverts.
  • Readiness probes decide when pods get traffic.
Key checks
  • kubectl rollout status deploy/<n> -n <ns> — rollout
  • kubectl rollout history deploy/<n> — revisions
  • kubectl rollout undo deploy/<n> — rollback
ReferenceWhy it matters1 section · depth on demand

What it is

A Deployment manages ReplicaSets to keep a number of identical pods running and performs rolling updates.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

A Deployment manages a set of identical pods for a stateless application and handles rolling updates: when the pod template changes, it replaces pods gradually so the application stays available.

spec:
  replicas: 3
  strategy:
    type: RollingUpdate
    rollingUpdate: { maxUnavailable: 0, maxSurge: 1 }
  template:
    spec:
      containers:
        - name: api
          image: registry.example.com/net-api:2.3.1
          readinessProbe: { httpGet: { path: /ready, port: 8080 } }
kubectl rollout status deploy/net-api --timeout=5m
kubectl rollout history deploy/net-api
kubectl rollout undo deploy/net-api

Readiness probes are what make rolling updates safe: without them, Kubernetes sends traffic to pods that have started but are not ready.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docKubernetes declarative automation current

Authoritative/upstream documentation reviewed for bounded claims in Kubernetes Automation > Deployments. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ · confidence 94%
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

For spec.selector/template identity, generation/observedGeneration, ReplicaSet rollout, readiness/availability conditions and rollback history, prefer typed fields and stable IDs over human presentation text.

Confirmation

Confirm action

Continue?