An init container must read database credentials that the main app also uses. What is an appropriate approach?
Select an answer to reveal the explanation.
Short Explanation
Secrets are shared keys on the building keyring: hand a copy to the setup crew (init) and to the staff (app) who both need the door opened—don’t paint the password on the hallway ConfigMap.
Full Explanation
Init containers can consume ConfigMaps, Secrets, and volumes like application containers. Mounting or injecting the same Secret into both containers that need credentials is normal. Baking secrets into images, misusing ConfigMaps for confidential data, or relying on hostPath are poor application practices.