Asterrr's Handbook

Packaging and rollouts

Helm charts, values and releases vs Kustomize bases and overlays, Deployment rolling updates and rollback, blue/green and canary releases, and progressive delivery with Argo Rollouts and Flagger.

Exam tasks: 3.1 (application delivery: packaging, release strategies, progressive delivery)

The decision: how do you produce the right manifests for each environment, and how do you swap the old version for the new one without taking users down with a bad release?

Packaging: Helm vs Kustomize

HelmKustomize
What it isPackage manager for Kubernetes. CNCF graduatedTemplate-free customization tool. A Kubernetes SIG CLI project, built into kubectl
UnitChart: templates plus values.yaml and Chart.yamlBase plus overlays, each with a kustomization.yaml
How it varies configGo templates filled from values (--set, -f values-prod.yaml)Patches, name prefixes, labels, image overrides, generated ConfigMaps and Secrets
Tracks installsYes: each install is a release with numbered revisionsNo: it just outputs YAML
Rollbackhelm rollback <release> <revision>Re-apply an older commit
DistributionChart repositories and OCI registries. Find public charts on Artifact HubGit directories
Run ithelm install, helm upgrade --install, helm uninstallkubectl apply -k <dir>, kubectl kustomize <dir>

Helm terms

  • Chart: the package. Release: one installed instance of a chart in a cluster, with its own name. You can install the same chart twice as two releases.
  • Values: inputs to the templates. Defaults come from the chart's values.yaml, and you override them per environment.
  • Revision: every upgrade or rollback adds one. helm history <release> lists them.
  • Release state is stored in the cluster, as Secrets in the release's namespace by default.
  • Dependencies: a chart can pull in other charts (a database subchart, for example).

Legacy: use Helm 3 and later: client-only, release state in Secrets instead

Helm 2 used a server-side component called Tiller running in the cluster with broad permissions. Helm 3 removed Tiller entirely: the helm client talks to the API server with your own credentials and RBAC. If an option mentions Tiller, it's describing a version that hasn't been supported for years.

Kustomize layout

deploy/
  base/                 # shared Deployment, Service, kustomization.yaml
  overlays/
    staging/            # 1 replica, image tag :rc
    production/         # 6 replicas, image tag :3.2.0, extra resource limits
# deploy/overlays/production/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - ../../base
namePrefix: prod-
images:
  - name: ghcr.io/tidewater/ledger
    newTag: "3.2.0"
patches:
  - path: replicas.yaml

Exam signal

"Package manager", "chart", "release", "values", "Artifact Hub" all mean Helm. "Overlays", "patches without templates", "kubectl apply -k" mean Kustomize. Neither one is a GitOps agent: Argo CD and Flux render both.

What Kubernetes does on its own

A Deployment has exactly two built-in strategies:

StrategyBehaviourDowntime
RollingUpdate (default)Creates a new ReplicaSet and shifts Pods over gradually, limited by maxSurge and maxUnavailable (both default 25%)None if readiness probes are right
RecreateDeletes all old Pods, then creates the new onesYes, by design. Use it when two versions can't run at the same time
  • A rollout starts when the Pod template changes (image, env, labels). Changing replicas scales but doesn't create a new revision.
  • kubectl rollout status deployment/ledger waits for it, kubectl rollout undo deployment/ledger goes back to the previous ReplicaSet, and kubectl rollout history lists revisions (10 kept by default, revisionHistoryLimit).
  • Readiness probes gate the rollout: a new Pod only receives Service traffic, and only counts as available, once it's ready. Without a probe, a broken version can look healthy.
2
Built-in Deployment strategies: RollingUpdate and Recreate.
25% / 25%
Default maxSurge and maxUnavailable for a rolling update.
10
Old ReplicaSets kept for rollback by default.
600 s
Default progressDeadlineSeconds before a stuck rollout is reported as failed.

Blue/green and canary

Rolling updateBlue/greenCanary
Versions live at onceBoth, briefly, mixedBoth, but only one gets trafficBoth, by traffic percentage
SwitchPod by PodAll traffic at onceGradual steps (5% → 25% → 100%)
RollbackNew rollout backwardsInstant: point traffic backSend the canary's share back to stable
Extra costLittleDouble capacity during the switchA few extra Pods
Built into KubernetesYesNo: done by switching a Service's selector, or by a toolNo: needs weighted routing (Gateway API, Ingress controller, service mesh) or a tool
  • Blue/green by hand: run ledger-blue and ledger-green Deployments and change the Service's selector from version: blue to version: green.
  • A crude canary by hand: two Deployments behind one Service, with a 9:1 replica ratio. The split is only as fine as your replica counts, which is why real canaries use weighted routing.
  • A/B testing routes by user attribute (header, cookie, region) rather than by percentage, to compare behaviour. Feature flags (OpenFeature is a CNCF project) hide new code paths without redeploying.

Canary is a Deployment strategy

strategy.type accepts only RollingUpdate or Recreate. There's no Canary or BlueGreen value in a Deployment. Options that set one are wrong; those strategies need extra objects or a tool such as Argo Rollouts.

Progressive delivery

Progressive delivery is canary or blue/green with automation: shift a little traffic, measure (error rate, latency from Prometheus or another metrics source), and either promote or roll back automatically.

Argo RolloutsFlagger
Part ofArgo project (graduated)Flux project (graduated)
How you use itReplace the Deployment with a Rollout object that has canary or blue/green stepsKeep your Deployment and add a Canary object. Flagger creates the primary and canary copies
AnalysisAnalysisTemplate queries metrics between stepsMetric checks with thresholds on each interval
TrafficService meshes, Ingress controllers, Gateway APIService meshes, Ingress controllers, Gateway API

Exam signal

"Automatically roll back the canary if the error rate exceeds 1%" is progressive delivery: Argo Rollouts or Flagger. A plain Deployment can't read metrics, and kubectl rollout undo is a manual step.

Scenarios

Scenario
A platform team needs to install the same monitoring application in 30 clusters, with a few settings that differ per cluster, and wants to upgrade or roll back each install as a tracked, versioned unit. Which tool fits best?
Scenario
An online store wants a new checkout version to receive 5% of live traffic, then 20%, then 100%, with the release stopped and reverted automatically if HTTP 5xx errors rise. Which approach meets this?
Scenario
Which release strategy keeps the old version fully deployed but idle so that rollback is an instant traffic switch?

Further reading

On this page