What command shows the current status of a Kubernetes deployment?
Use kubectl rollout status deployment/<deployment-name> to see the current status of a deployment.
Click to reveal answer
beginner
How can you view the history of revisions for a Kubernetes deployment?
Use kubectl rollout history deployment/<deployment-name> to list all past revisions of the deployment.
Click to reveal answer
beginner
What does the command kubectl rollout undo deployment/<deployment-name> do?
It rolls back the deployment to the previous revision, undoing the last change.
Click to reveal answer
intermediate
What information does kubectl rollout history provide about each revision?
It shows the revision number and the change cause if annotated, helping track what changed in each deployment update.
Click to reveal answer
beginner
Why is monitoring deployment status important in Kubernetes?
It helps ensure your application updates are successful and lets you quickly detect and fix problems during rollout.
Click to reveal answer
Which command shows the rollout status of a deployment named 'webapp'?
Akubectl rollout status deployment/webapp
Bkubectl get pods webapp
Ckubectl describe deployment webapp
Dkubectl rollout history deployment/webapp
✗ Incorrect
The command kubectl rollout status deployment/webapp shows the current rollout status.
How do you see all past revisions of a deployment?
Akubectl rollout history deployment/<name>
Bkubectl get deployment --history
Ckubectl describe deployment --revisions
Dkubectl rollout status deployment/<name>
✗ Incorrect
Use kubectl rollout history deployment/<name> to view deployment revisions.
What happens when you run kubectl rollout undo deployment/myapp?
AIt shows the deployment status
BIt deletes the deployment
CIt updates the deployment to the latest image
DIt rolls back to the previous deployment revision
✗ Incorrect
The command rolls back the deployment to the previous revision.
Which command helps you track what changed in each deployment revision?
Akubectl logs deployment/<name>
Bkubectl rollout history deployment/<name>
Ckubectl get pods
Dkubectl describe pod
✗ Incorrect
The rollout history command shows revision details and change causes.
Why should you monitor deployment status during updates?
ATo increase cluster size
BTo delete old pods
CTo ensure updates succeed and catch errors early
DTo change container images manually
✗ Incorrect
Monitoring helps confirm successful updates and detect problems quickly.
Explain how to check the status and history of a Kubernetes deployment and why it matters.
Think about commands to see current state and past changes, plus why watching updates is useful.
You got /4 concepts.
Describe the steps to rollback a Kubernetes deployment to a previous version.
Recall commands for history, undo, and status checking.
You got /3 concepts.
Practice
(1/5)
1. What does the command kubectl rollout status deployment/myapp do in Kubernetes?
easy
A. It shows if the deployment named 'myapp' is successfully running or still updating.
B. It deletes the deployment named 'myapp' from the cluster.
C. It creates a new deployment named 'myapp'.
D. It lists all pods running in the cluster.
Solution
Step 1: Understand the command purpose
The command kubectl rollout status checks the current status of a deployment rollout.
Step 2: Apply to the specific deployment
Using deployment/myapp targets the deployment named 'myapp' to see if it is running or updating.
Final Answer:
It shows if the deployment named 'myapp' is successfully running or still updating. -> Option A
Quick Check:
Rollout status = Deployment running status [OK]
Hint: Use rollout status to check deployment health quickly [OK]
Common Mistakes:
Confusing rollout status with deployment creation
Thinking it deletes or lists pods
Using wrong resource type after rollout status
2. Which of the following is the correct syntax to view the rollout history of a deployment named 'webapp'?
easy
A. kubectl get rollout history webapp
B. kubectl describe rollout webapp
C. kubectl rollout status deployment/webapp
D. kubectl rollout history deployment/webapp
Solution
Step 1: Identify the correct command for rollout history
The command to view rollout history is kubectl rollout history.
Step 2: Use correct resource type and name
Appending deployment/webapp specifies the deployment named 'webapp'.
Final Answer:
kubectl rollout history deployment/webapp -> Option D
Quick Check:
Rollout history syntax = kubectl rollout history deployment/name [OK]
Hint: Remember: rollout history shows past changes, rollout status shows current state [OK]
Common Mistakes:
Using 'get' or 'describe' instead of 'rollout history'
Omitting 'deployment/' prefix
Confusing rollout status with rollout history
3. Given the command output:
deployment "frontend" successfully rolled out
What command was most likely run to get this output?
medium
A. kubectl get pods -l app=frontend
B. kubectl rollout history deployment/frontend
C. kubectl rollout status deployment/frontend
D. kubectl describe deployment frontend
Solution
Step 1: Analyze the output message
The message says the deployment "frontend" was successfully rolled out, indicating a status check.
Step 2: Match output to command
kubectl rollout status shows this success message, while history or describe commands show different outputs.
Final Answer:
kubectl rollout status deployment/frontend -> Option C
Quick Check:
Success rollout message = rollout status command [OK]
Hint: Success message means rollout status was checked [OK]
Common Mistakes:
Confusing rollout history output with status output
Assuming pod listing shows rollout success
Using describe which shows detailed info, not status message
4. You ran kubectl rollout history deployment/api but got an error: error: deployments.apps "api" not found. What is the most likely cause?
medium
A. The Kubernetes cluster is down.
B. The deployment named 'api' does not exist in the current namespace.
C. You need to add '--all-namespaces' to see the deployment.
D. The command syntax is incorrect; 'rollout history' is invalid.
Solution
Step 1: Understand the error message
The error says deployment "api" not found, meaning Kubernetes can't find that deployment in the current namespace.
Step 2: Check command and context
The command syntax is correct, and cluster down would cause different errors. Missing deployment is the most likely cause.
Final Answer:
The deployment named 'api' does not exist in the current namespace. -> Option B
Quick Check:
Deployment not found error = deployment missing [OK]
Hint: Check deployment name and namespace if 'not found' error appears [OK]
Common Mistakes:
Assuming syntax error when command is correct
Forgetting namespace context
Blaming cluster status without checking deployment
5. You want to rollback your deployment 'backend' to the previous version after a failed update. Which sequence of commands correctly checks the history and rolls back?
hard
A. kubectl rollout history deployment/backend kubectl rollout undo deployment/backend
B. kubectl rollout status deployment/backend kubectl delete deployment/backend
C. kubectl get pods -l app=backend kubectl rollout history deployment/backend
D. kubectl rollout undo deployment/backend kubectl rollout history deployment/backend
Solution
Step 1: Check rollout history
Use kubectl rollout history deployment/backend to see past versions and confirm rollback target.
Step 2: Rollback to previous version
Use kubectl rollout undo deployment/backend to revert to the last successful deployment.
Final Answer:
kubectl rollout history deployment/backend followed by kubectl rollout undo deployment/backend -> Option A
Quick Check:
History then undo = safe rollback steps [OK]
Hint: Always check history before undoing a rollout [OK]
Common Mistakes:
Deleting deployment instead of rolling back
Undoing before checking history
Confusing status command with rollback
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.