Does this set of Kubernetes tools and steps accomplish this?
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.
A . Yes
B . No
Answer: B
Explanation:
= Mounting the configuration file directly into the appropriate pod and container using the .spec.containers.configMounts key is not a valid way to provide a configuration file to a container at runtime. The .spec.containers.configMounts key does not exist in the Kubernetes API1. The correct way to provide a configuration file to a container at runtime is to use a ConfigMap2. A ConfigMap is a Kubernetes object that stores configuration data as key-value pairs. You can create a ConfigMap from a file, and then mount the ConfigMap as a volume into the pod and container. The configuration file will be available as a file in the specified mount path3. Alternatively, you can also use environment variables to pass configuration data to a container from a ConfigMap4.
Reference: PodSpec v1 core
Configure a Pod to Use a ConfigMap
Populate a Volume with data stored in a ConfigMap
Define Container Environment Variables Using ConfigMap Data
Latest DCA Dumps Valid Version with 55 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund