Correct Answer: Store db-config.yaml in a ConfigMap and the password in a Secret, and mount both as volumes or expose them as environment variables in the Pod
General application configurations like connection strings, ports, and connection pool properties are non-sensitive and should be stored in ConfigMaps. Sensitive data like password...
Correct Answer
Store db-config.yaml in a ConfigMap and the password in a Secret, and mount both as volumes or expose them as environment variables in the Pod
Why This Answer Is Correct
General application configurations like connection strings, ports, and connection pool properties are non-sensitive and should be stored in ConfigMaps. Sensitive data like passwords or private keys should be stored in Secrets.
This question evaluates your knowledge of Kubernetes Core — a core concept tested in cloud certification exams. Understanding Kubernetes Core is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.
To safely isolate resources (like Deployments and Services) belonging to different teams on the same cluster, you should use:
A developer wants to run a multi-container pod where a main application container writes files to a shared directory, and a secondary sidecar container reads and processes those files in real-time. How should the storage be shared between these two containers in the same Pod?
A security audit reveals that default service account tokens are being automatically mounted in all Pods, posing a credential exposure risk. How can you configure a Pod spec to prevent the automatic mounting of the default ServiceAccount token?
You have a database application pod that must wait for a configuration database service (config-db) to be fully running and accessible over the network before starting the main application container. What is the most resilient way to implement this dependency check?