Bird
0
0

You want your CRD to automatically generate OpenAPI validation schemas for your custom resource. Which field should you include?

hard📝 Application Q9 of 15
Kubernetes - Operators and Custom Resources
You want your CRD to automatically generate OpenAPI validation schemas for your custom resource. Which field should you include?
Ametadata.validation
Bspec.validationSchema
Cspec.schemaDefinition
Dspec.versions.schema.openAPIV3Schema
Step-by-Step Solution
Solution:
  1. Step 1: Locate schema field for validation

    OpenAPI validation schema is defined under spec.versions.schema.openAPIV3Schema.
  2. Step 2: Verify other options

    spec.validationSchema and metadata.validation are invalid; spec.schemaDefinition is not a valid field.
  3. Final Answer:

    spec.versions.schema.openAPIV3Schema -> Option D
  4. Quick Check:

    Validation schema is under spec.versions.schema.openAPIV3Schema [OK]
Quick Trick: Use spec.versions.schema.openAPIV3Schema for validation [OK]
Common Mistakes:
  • Using spec.validationSchema instead
  • Placing validation under metadata
  • Confusing schema field names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes