2V0-71.23 Question 11
Single answerA development team is deploying a set of microservices on a Kubernetes cluster. They want to ensure that certain configuration data, such as database connection strings, can be dynamically loaded into their applications without hardcoding it in the container images. Which Kubernetes logical object should they use to achieve this?
- A
ConfigMap
- B
Pod
- C
Service
- D
Namespace
Show answer and explanation
Correct answer: A
Explanation
ConfigMap is the correct Kubernetes logical object to use when storing and managing configuration data as key-value pairs. It allows applications to load configuration dynamically, providing flexibility and decoupling configuration from container images. Other options like Pod, Service, and Namespace do not serve this purpose.
- A. Correct.
ConfigMap is a Kubernetes logical object used to store configuration data in key-value pairs. It allows applications to load configuration dynamically without embedding it in container images. This is the correct answer.
- B. Incorrect.
Pod is a fundamental Kubernetes object that represents one or more containers running together. However, it does not handle configuration data storage or loading. This is incorrect.
- C. Incorrect.
Service is used to expose a set of Pods as a network service. It deals with networking, not configuration management. This is incorrect.
- D. Incorrect.
Namespace is used to create isolated environments within the same Kubernetes cluster. It organizes resources but does not handle application configuration. This is incorrect.