Bird
0
0

You tried to deploy a workload on EKS using kubectl apply -f deployment.yaml, but got an error: error: unable to recognize "deployment.yaml": no matches for kind "Deploy". What is the likely cause?

medium📝 Debug Q14 of 15
AWS - EKS
You tried to deploy a workload on EKS using kubectl apply -f deployment.yaml, but got an error: error: unable to recognize "deployment.yaml": no matches for kind "Deploy". What is the likely cause?
AThe cluster is not running
Bkubectl is not installed
CThe YAML file has a typo in the kind field; it should be 'Deployment' not 'Deploy'
DThe image name in the YAML is incorrect
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the error message

    The error says no matches for kind "Deploy", which means Kubernetes does not recognize this resource kind.
  2. Step 2: Check the YAML kind field

    The correct kind for workload deployment is "Deployment", not "Deploy". This typo causes the error.
  3. Final Answer:

    The YAML file has a typo in the kind field; it should be 'Deployment' not 'Deploy' -> Option C
  4. Quick Check:

    Kind field must be exact Kubernetes resource name [OK]
Quick Trick: Check resource kind spelling in YAML for errors [OK]
Common Mistakes:
  • Ignoring error details about resource kind
  • Assuming cluster or kubectl issues without checking YAML
  • Blaming image name for syntax errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes