nerdexam
Cisco

300-910 · Question #9

ConfigMap keys have been mapped to different file names using the volumes.configMap.items field. What is the result if a wrong ConfigMap key is specified?

The correct answer is B. The volume is not created.. If an incorrect ConfigMap key is specified when projecting specific keys to files within a volume, Kubernetes will fail to create the volume because the source key does not exist.

Application Deployment and Operations

Question

ConfigMap keys have been mapped to different file names using the volumes.configMap.items field. What is the result if a wrong ConfigMap key is specified?

Options

  • AThe default path is not used.
  • BThe volume is not created.
  • CThe volume is created.
  • DThe volume is created with errors.

How the community answered

(26 responses)
  • B
    88% (23)
  • C
    8% (2)
  • D
    4% (1)

Why each option

If an incorrect ConfigMap key is specified when projecting specific keys to files within a volume, Kubernetes will fail to create the volume because the source key does not exist.

AThe default path is not used.

The default path would not be used because the issue is with a specified key that doesn't exist, preventing the volume's content from being mapped as intended.

BThe volume is not created.Correct

When using `volumes.configMap.items` to selectively project specific ConfigMap keys as files into a volume, Kubernetes validates that the specified keys actually exist within the referenced ConfigMap. If a wrong or non-existent key is specified, the volume mounting will fail, and thus the volume will not be created successfully with the requested content.

CThe volume is created.

The volume would not be created successfully with the specified content; instead, the pod would likely fail to start due to the inability to mount the volume as configured.

DThe volume is created with errors.

While 'with errors' is vague, the more precise outcome is that the volume creation or mounting operation fails entirely, preventing the pod from reaching a running state.

Concept tested: Kubernetes ConfigMap volume mounting errors

Source: https://kubernetes.io/docs/concepts/configuration/configmap/#mounted-configmaps-are-updated-automatically

Topics

#Kubernetes ConfigMaps#Kubernetes Volumes#Pod startup failures#Resource dependencies

Community Discussion

No community discussion yet for this question.

Full 300-910 Practice