Which command is used to create a ConfigMap in Kubernetes from a file containing key-value entries?

Prepare for the Kubernetes Cloud Native Associate (KCNA) Certification test with engaging questions and detailed explanations. Perfect your knowledge and boost your confidence to pass the exam successfully!

Multiple Choice

Which command is used to create a ConfigMap in Kubernetes from a file containing key-value entries?

Explanation:
Creating a ConfigMap from a file that contains key-value entries is done by reading an environment-style file where each line is KEY=VALUE and turning those lines into data entries in the ConfigMap. The option that loads such a file and names the ConfigMap accordingly is used with the file path, so each line in the file becomes one key-value pair in the ConfigMap. This matches the requirement of creating from a file containing key-value entries. The other approaches don’t fit: one creates a ConfigMap from a literal key-value inline, not from a file; another applies a manifest from disk rather than constructing the ConfigMap from a key-value file; and the last retrieves an existing ConfigMap rather than creating a new one.

Creating a ConfigMap from a file that contains key-value entries is done by reading an environment-style file where each line is KEY=VALUE and turning those lines into data entries in the ConfigMap. The option that loads such a file and names the ConfigMap accordingly is used with the file path, so each line in the file becomes one key-value pair in the ConfigMap. This matches the requirement of creating from a file containing key-value entries.

The other approaches don’t fit: one creates a ConfigMap from a literal key-value inline, not from a file; another applies a manifest from disk rather than constructing the ConfigMap from a key-value file; and the last retrieves an existing ConfigMap rather than creating a new one.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy