Bird
0
0

You ran kubectl rollout history deployment/api but got an error: error: deployments.apps "api" not found. What is the most likely cause?

medium📝 Troubleshoot Q14 of 15
Kubernetes - ReplicaSets and Deployments
You ran kubectl rollout history deployment/api but got an error: error: deployments.apps "api" not found. What is the most likely cause?
AThe Kubernetes cluster is down.
BThe deployment named 'api' does not exist in the current namespace.
CYou need to add '--all-namespaces' to see the deployment.
DThe command syntax is incorrect; 'rollout history' is invalid.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the error message

    The error says deployment "api" not found, meaning Kubernetes can't find that deployment in the current namespace.
  2. 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.
  3. Final Answer:

    The deployment named 'api' does not exist in the current namespace. -> Option B
  4. Quick Check:

    Deployment not found error = deployment missing [OK]
Quick Trick: 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

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes