Bird
0
0

Given a deployment named webapp already exists, what will be the output of kubectl create -f deployment.yaml?

medium📝 Command Output Q4 of 15
Kubernetes - kubectl Essential Commands
Given a deployment named webapp already exists, what will be the output of kubectl create -f deployment.yaml?
AError: deployment "webapp" already exists
BDeployment created successfully
CDeployment updated successfully
DNo output, command runs silently
Step-by-Step Solution
Solution:
  1. Step 1: Understand create behavior on existing resource

    kubectl create fails if the resource already exists and shows an error.
  2. Step 2: Analyze output options

    Only Error: deployment "webapp" already exists shows the error message expected when resource exists.
  3. Final Answer:

    Error: deployment "webapp" already exists -> Option A
  4. Quick Check:

    Create errors if resource exists = B [OK]
Quick Trick: Create fails if resource exists; apply updates instead [OK]
Common Mistakes:
  • Expecting create to update resource
  • Thinking create runs silently
  • Confusing create with apply

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes