DCA · Question #90
DCA Question #90: Real Exam Question with Answer & Explanation
The correct answer is B: No. While using a ConfigMap is the correct approach to provide configuration files, the .spec.containers.configMounts key is an incorrect and non-existent method for mounting them into a container.
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 and mount it directly into the appropriate pod and container using the .spec.containers.configMounts key.
Options
- AYes
- BNo
Explanation
While using a ConfigMap is the correct approach to provide configuration files, the .spec.containers.configMounts key is an incorrect and non-existent method for mounting them into a container.
Common mistakes.
- A. The method for mounting ConfigMaps into containers is via volumes and volume mounts (
.spec.volumesand.spec.containers.volumeMounts), not through a non-existent key like.spec.containers.configMounts.
Concept tested. Kubernetes ConfigMap mounting
Topics
Community Discussion
No community discussion yet for this question.