Release configuration and safe delivery
Define what to verify before promoting a release and what a Deployment rollback can restore.
What you will understand
- Record the image, configuration, and manifest inputs needed to reproduce a release.
- Check a readiness-gated rollout and measure the behavior callers actually need.
- Evaluate whether the previous version can still use the current data and configuration.
Builds on: HPA, VPA, and node autoscaling
Record what makes up a release
A new API image starts and returns HTTP 200 on /ready, but checkout still fails because the image expects a configuration key that staging used and production lacks. A release includes the image, rendered workload, configuration, and external dependencies. Record the versions and references together. An image digest identifies the exact image contents, while a floating tag can refer to different contents later.
A Deployment revision is created when its Pod template changes. Updating an independently referenced ConfigMap does not change that template by itself. A ConfigMap mounted as a normal volume may refresh eventually, but the app must use the refreshed value. Environment variables from it are available at process startup. If your release requires a restart, a versioned config reference or another deliberate Pod template change can trigger it. Inspect the scene to see which inputs belong to a release.
Which inputs belong to this release?
An image, its rendered manifests, and the configuration the app consumes all affect the running version. A Pod template change triggers a new revision.
Record the full inputs
- Source revisionRendered resourcesrendered source
- Image digestPod templateimage reference
Associate the source revision, image digest and configuration source so a later investigation can reproduce the intended environment.
Make the config reference reproducible
- Versioned ConfigMapPod templateversioned reference
- Rendered resourcesPod templateresource specification
A versioned generated configuration reference can change the Pod template when configuration changes, making the rollout explicit.
Roll out the changed template
- Pod templateRunning processnew Pod process
A changed template produces new Pods through a new ReplicaSet. Updating only mutable ConfigMap data does not necessarily do this.
Verify the application read its configuration
- Versioned ConfigMapRunning processverify effective behavior
Check that the process uses the intended image and configuration without revealing credentials. Mounted reload and startup environment have different behavior.
Credential values are external to the release artifact; references and delivery method are recorded.
Explore another case
Set the rollout budget and readiness check
The example fragments apply to an existing Deployment and container. The rollout allows one extra Pod and aims to avoid reducing availability due to the update. New Pods have to remain ready for ten seconds before being counted as available. The readiness check must actually exist on port 8080. Give it a meaningful condition for receiving requests, and make sure capacity and quota can accommodate the extra Pod.
# Deployment spec fragment.
replicas: 3
minReadySeconds: 10
progressDeadlineSeconds: 300
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0# Container probe fragment; the application must implement /ready.
readinessProbe:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 2
periodSeconds: 5Verify a release before promoting it
Reproduce the intended change with the same rendering inputs you plan to promote. Inspect the diff, watch the rollout, and compare the Service’s ready endpoints with the expected replica count. Run a user-level check for the operation you care about, such as one checkout or report read. Compare error rate and latency with a known baseline if your lab has instrumentation. The scene shows how passing one gate leaves the next verification to do.
When is a rollout ready for promotion?
First verify available replicas and ready endpoints. Then check a representative request through the real application path.
Use the surge allowance
- Old replicasThree available instances
- DeploymentNew replicasurge=1
The controller can start an extra candidate while keeping the old replicas, provided requests and quota fit.
Wait for stable readiness
- New replicaReadiness gateprobe + interval
The candidate must satisfy readiness and the available interval before it counts toward replacement progress.
Check application behavior
- Readiness gateDeploymentavailable
- Customer probeNew replicacustomer path
After availability, the controller can remove an old instance and continue. Independently run a safe customer-path check and observe telemetry.
Verify rollback compatibility
- Customer probeData compatibilityrecovery decision
If evidence fails, compare rollback and roll-forward against data/configuration compatibility. A template rollback cannot reverse every external side effect.
Three replicas, maxSurge=1, maxUnavailable=0 and sufficient temporary capacity.
Inspect YAML or commands
Wait for stable readiness
minReadySeconds: 10Explore another case
kubectl diff -k overlays/training
kubectl apply -k overlays/training
kubectl rollout status deployment/api -n learning --timeout=300s
kubectl get deployment,replicaset,pod -n learning -l app=api
kubectl get endpointslices -n learning \
-l kubernetes.io/service-name=api
kubectl rollout history deployment/api -n learning
# Only after choosing a compatible recovery action:
# kubectl rollout undo deployment/api -n learning --to-revision=REVISIONUse the application delivery lab to promote a small change and document the evidence. The local overlay is intended for training. Adapt the probe fragment to a server that implements it before applying that fragment.
Check old code against new data and settings
Before choosing rollback, ask whether the previous image can run with the current configuration and data format. Restoring an old Pod template cannot reverse a schema migration or restore replaced credentials. For a database column removal, plan a transition that allows both versions to run during the rollout, and keep a separate data recovery procedure.
Check your understanding
The Deployment finished its rollout, but the checkout smoke test fails. What does the rollout status tell you and what do you still need to investigate?
The controller reports that the new Pods met its rollout conditions. Investigate the application paths, dependencies, and configuration that the readiness check did not exercise. Use that evidence to choose a fix or a compatible rollback.
Primary documentation
Go to the source
Reviewed 2026-10-27 · Kubernetes 1.37 · Related local exercise