Typorithm · medium

kubectl rollout & scale

kubectl-rolloutkubernetesrolloutscaleoperations
Saved on this device
Full lesson · 8 learning steps Open any exercise for focused practice
1

Step 1 of 8 · intro card

Learn kubectl rollout & scale

0%

kubectl Commands

Operate a deployment: rollout status to watch, restart to cycle pods, undo to roll back, and scale --replicas to resize.

A Deployment manages rollouts through ReplicaSet revisions, and kubectl rollout drives them.

status blocks until the update completes; restart cycles pods to pick up new config or images; undo reverts to the last revision.

scale --replicas adjusts the running pod count without editing the manifest.

01

rollout status waits for completion.

02

rollout restart cycles all pods.

03

rollout undo reverts a revision.

kubectl rollout status deployment/web
kubectl rollout restart deployment/web
kubectl rollout undo deployment/web
kubectl scale deployment/web --replicas=5

Read the implementation

Connect each part of the code to the concept before you type.

1. Watch the rollout

status blocks until the deployment finishes rolling out or fails.

kubectl rollout status deployment/web

2. Restart pods

restart triggers a rolling replacement of all pods, e.g. to pick up new config.

kubectl rollout restart deployment/web

3. Roll back

undo reverts to the previous ReplicaSet revision.

kubectl rollout undo deployment/web

4. Set replicas

scale changes the desired replica count immediately.

kubectl scale deployment/web --replicas=5

A complete learning loop

01

Understand

Read the concept map and follow the code breakdown.

02

Reconstruct

Type the implementation, repair mistakes and work through every recall exercise.

03

Verify

Use the final check without hints; revisit weak concepts in short practice sessions.

kubectl rollout & scale: Lesson & Practice · Typorithm | ApplyDjinn