

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: The Control Plane
incomplete
2: Labels
incomplete
3: Dry Run
incomplete
4: Kubectl Explain
incomplete
5: Rollouts
incomplete
6: Rollbacks
incomplete
7: API Deployment
incomplete
8: Thrashing Pods
incomplete
This lesson's interactive features are locked, please to keep using them
When you change a deployment's pod template (the image, the environment variables, anything under spec.template), Kubernetes doesn't kill all the old pods at once. It does a rolling update:
It creates a new ReplicaSet for the new version of the pods.
It scales the new ReplicaSet up a pod or two at a time.
It scales the old ReplicaSet down as the new pods become ready.
As long as the new pods come up healthy, users shouldn't notice anything because there are always at least some healthy pods serving traffic. Each new version of the template is a numbered revision. The kubectl rollout command manages this process:
kubectl rollout status deployment NAME: Watch a rollout until it finishes
kubectl rollout history deployment NAME: List the revisions
kubectl rollout restart deployment NAME: Replace every pod with a fresh one, without changing the config
Now, the restart command might sound pointless... but you'll probably use it fairly often. It's the "turn it off and on again" of Kubernetes.
In order for rollouts to be truly seamless for your users, you also need to make sure that old pods finish handling requests in progress before they're shut down, and that new pods are fully ready before they start handling requests.
Submit the shell checks.