Bird
0
0

You receive an error applying a CRD YAML: "unknown field 'spec.names.kindName'". How should you correct this?

medium📝 Troubleshoot Q7 of 15
Kubernetes - Operators and Custom Resources
You receive an error applying a CRD YAML: "unknown field 'spec.names.kindName'". How should you correct this?
AChange 'kindName' to 'kind' under 'spec.names'
BRemove the 'names' section entirely
CRename 'spec' to 'metadata' in the YAML
DAdd 'kindName' under 'metadata' instead
Step-by-Step Solution
Solution:
  1. Step 1: Identify the invalid field

    The error indicates 'kindName' is not recognized under 'spec.names'.
  2. Step 2: Use correct field name

    The correct field is 'kind' to specify the resource kind.
  3. Final Answer:

    Change 'kindName' to 'kind' under 'spec.names' -> Option A
  4. Quick Check:

    Use 'kind' not 'kindName' in CRD names [OK]
Quick Trick: Use 'kind' field under spec.names, not 'kindName' [OK]
Common Mistakes:
  • Using incorrect field names like 'kindName'
  • Removing required 'names' section
  • Misplacing fields under metadata

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes