DCA · Question #92
You want to provide a configuration file to a container at runtime. Does this set of Kubernetes tools and steps accomplish this? Solution: Turn the configuration file into a configMap object, use it…
The correct answer is A. Yes. This solution correctly describes the standard Kubernetes method for providing configuration files to containers at runtime.
Question
You want to provide a configuration file to a container at runtime. Does this set of Kubernetes tools and steps accomplish this? Solution: Turn the configuration file into a configMap object, use it to populate a volume associated with the pod, and mount that file from the volume to the appropriate container and path.
Options
- AYes
- BNo
How the community answered
(30 responses)- A93% (28)
- B7% (2)
Why each option
This solution correctly describes the standard Kubernetes method for providing configuration files to containers at runtime.
In Kubernetes, configuration data is typically stored in a ConfigMap object. This ConfigMap can then be referenced by a pod to populate a volume, and specific files from that volume can be mounted into the container at the desired path, making the configuration available at runtime.
This solution accurately details the standard process for using ConfigMaps to inject configuration files into Kubernetes containers.
Concept tested: Kubernetes ConfigMap volume mounts
Source: https://kubernetes.io/docs/concepts/configuration/configmap/#add-configmap-data-to-a-volume
Topics
Community Discussion
No community discussion yet for this question.