About this scenario
cache is a 3-replica Redis StatefulSet on redis:7.4. You need to move it to redis:8.0, but you want one replica on 8.0 for a while before the others follow.
A StatefulSet updates Pods from the highest ordinal down. Its rolling update partition holds back every Pod whose ordinal is below it.
Objectives
- Only cache-2 runs redis 8.0
- See the partitioned rollout finish
- All three run redis 8.0
What you'll practice
- With a
partition of N, only Pods with an ordinal of N or more get the new template. The others stay on the current revision, even if they're recreated. - Each template change is a ControllerRevision (
kubectl get controllerrevisions), which is what kubectl rollout history and kubectl rollout undo use for StatefulSets. - Set the partition before changing the template. Changing the image first starts the full rollout at once.
- Lowering the partition step by step gives you a staged rollout you control, one ordinal at a time.
How the playground works
The cluster runs entirely in your browser: a simulated API server, scheduler, kubelets and controllers, with virtual nodes in three zones. kubectl output follows the real formats, errors use the real messages, and the add-ons (CSI storage, Traefik, Envoy Gateway, cert-manager, Flux, Argo CD) behave like their real counterparts for the common paths. It's a simulation, so some behavior is simplified. Your progress is saved in this browser.