Kubernetes and Cloud Native Associate (KCNA) — Question 144
Which of the following options include only mandatory fields to create a Kubernetes object using a YAML file?
Answer options
- A. apiVersion, template, kind, status
- B. apiVersion, metadata, status, spec
- C. apiVersion, template, kind, spec
- D. apiVersion, metadata, kind, spec
Correct answer: D
Explanation
The correct answer is D because it includes 'apiVersion', 'metadata', 'kind', and 'spec', which are the essential fields for defining a Kubernetes object. Options A, B, and C include either 'status' or 'template', which are not required for object creation.