QuestionQ53

Verified703.2 Basic Kubernetes Operations

Which of the following critical issues exists in the following Kubernetes resources?

Question Image

Explanation

Kubernetes requires all annotation (and label) values to be strings, but in YAML an unquoted value such as 1.1 is parsed as a numeric floating-point literal rather than a string, so when this manifest is submitted the API server's validation rejects the annotations field because its value does not conform to the required string type; the fix is to quote the value, for example version: "1.1". Pod is a core API resource, and core resources are addressed with just the version, apiVersion: v1, without any group prefix, so that field is correct as written, a container is properly defined under spec.containers, and image references legitimately use a colon to separate the repository name from its tag, such as nginx:latest.

Community Discussion

No comments yet. Be the first to start the discussion!