Topic 1 Question 42
You've deployed a microservice called myapp1 to a Google Kubernetes Engine cluster using the YAML file specified below:
You need to refactor this configuration so that the database password is not stored in plain text. You want to follow Google-recommended practices. What should you do?Store the database password inside the Docker image of the container, not in the YAML file.
Store the database password inside a Secret object. Modify the YAML file to populate the DB_PASSWORD environment variable from the Secret.
Store the database password inside a ConfigMap object. Modify the YAML file to populate the DB_PASSWORD environment variable from the ConfigMap.
Store the database password in a file inside a Kubernetes persistent volume, and use a persistent volume claim to mount the volume to the container.
ユーザの投票
コメント(17)
it is good practice to use Secrets for confidential data (like API keys) and ConfigMaps for non-confidential data (like port numbers). B is correct.
👍 63rramani72020/05/31B is correct answer https://cloud.google.com/kubernetes-engine/docs/concepts/secret
👍 34saurabh18052020/06/04- 正解だと思う選択肢: B
Sensitive content is always gets stored in Secrets.
👍 2raghu092022/09/14
シャッフルモード