試験DCA トピック1 問題27 スレッド

Docker DCAのリアル試験問題集
問題 #: 27
トピック #: 1
A company's security policy specifies that development and production containers must run on separate nodes in a given Swarm cluster. Can this be used to schedule containers to meet the security policy requirements?
Solution.environment variables

おすすめの解答:B 解答を投票する

Explanation
Environment variables cannot be used to schedule containers to meet the security policy requirements. Environment variables are used to pass configuration data to the containers, not to control where they run1. To schedule containers to run on separate nodes in a Swarm cluster, you need to use node labels and service constraints23. Node labels are key-value pairs that you can assign to nodes to organize them into groups4. Service constraints are expressions that you can use to limit the nodes where a service can run based on the node labels. For example, you can label some nodes as env=dev and others as env=prod, and then use the constraint --constraint node.labels.env==dev or --constraint node.labels.env==prod when creating a service to ensure that it runs only on the nodes with the matching label. References:
* 1: Environment variables in Compose | Docker Docs
* 2: Deploy services to a swarm | Docker Docs
* 3: How to use Docker Swarm labels to deploy containers on specific nodes
* 4: Manage nodes in a swarm | Docker Docs
* [5]: Swarm mode routing mesh | Docker Docs
* [6]: Docker Swarm - How to set environment variables for tasks on various nodes

藤岛** 2024-02-18 01:52:45

コメント

正解:
?」こちらは投票コメントになっております。普通のコメントに切り替えます。
ニックネーム: 送信 キャンセル
投票コメントをあげるごとに、選択した解答の投票数を1つ増やすことができます。

他人の解答コメントを賛成するのも、その解答に一票を入れることになります。したがって、すでに同じ意見の投票コメントが存在する場合、新規コメントをする代わりに賛成することもできます。

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡