Bird
0
0

What will be the output of the command kubectl delete deployment web-app if the deployment exists?

medium📝 Command Output Q4 of 15
Kubernetes - kubectl Essential Commands
What will be the output of the command kubectl delete deployment web-app if the deployment exists?
A"deployment.apps \"web-app\" created"
B"deployment.apps \"web-app\" updated"
C"error: deployment \"web-app\" not found"
D"deployment.apps \"web-app\" deleted"
Step-by-Step Solution
Solution:
  1. Step 1: Understand delete command output

    When a deployment is deleted successfully, kubectl outputs a message confirming deletion.
  2. Step 2: Match output to options

    "deployment.apps \"web-app\" deleted" shows the correct deletion confirmation message. "deployment.apps \"web-app\" created" is for creation, C is error if not found, D is for update.
  3. Final Answer:

    "deployment.apps \"web-app\" deleted" -> Option D
  4. Quick Check:

    Delete output = Confirmation message [OK]
Quick Trick: Delete shows 'deleted' message on success [OK]
Common Mistakes:
  • Confusing delete output with create or update
  • Expecting error when resource exists
  • Ignoring exact output format

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes