KCNA · Question #176
Which of the following is not the required field to describe Kubernetes objects?
The correct answer is D. Container. Kubernetes objects universally require apiVersion, kind, metadata, and spec fields, while Container is a field within the spec of specific object types like Pods, not a top-level required field for all objects.
Question
Which of the following is not the required field to describe Kubernetes objects?
Options
- Ametadata
- BapiVersion
- CKind
- DContainer
- Espec
How the community answered
(63 responses)- A3% (2)
- B5% (3)
- C2% (1)
- D89% (56)
- E2% (1)
Why each option
Kubernetes objects universally require `apiVersion`, `kind`, `metadata`, and `spec` fields, while `Container` is a field within the `spec` of specific object types like Pods, not a top-level required field for all objects.
`metadata` is a required field for all Kubernetes objects, containing information like name, labels, and annotations.
`apiVersion` is a required field that specifies the version of the Kubernetes API to which the object belongs.
`Kind` is a required field that specifies what kind of object is being created (e.g., Pod, Deployment, Service).
`Container` is a field defined *within* the `spec` section of a Pod object (or other workload resources) to describe the container to be run. It is not one of the top-level required fields for *all* Kubernetes objects, unlike `apiVersion`, `kind`, `metadata`, and `spec`.
`spec` is a required field for most Kubernetes objects, describing the desired state of the object.
Concept tested: Kubernetes object required fields
Source: https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/
Topics
Community Discussion
No community discussion yet for this question.