What statement is true regarding the Swarm service created by the following command? docker service create --name myweb --network webnet --mode global nginx
A.
It runs exactly one time in the Swarm and cannot be scaled.
B.
It runs exactly once on each node in a Swarm.
C.
It runs on one node by default and can be scaled to an arbitrary number of replicas.
D.
It runs on all nodes which provide the network webnet.
E.
It runs only on those nodes which support the network type global.
it's "B"
"Set service mode (--mode)
The service mode determines whether this is a replicated service or a global service. A replicated service runs as many tasks as specified, while a global service runs on each active node in the swarm."
see:
https://docs.docker.com/engine/reference/commandline/service_create/#set-service-mode---mode
The correct answer is D.
The command docker service create --name myweb --network webnet --mode global nginx creates a Swarm service named "myweb" using the "nginx" image. The --network webnet option specifies that the service should be connected to the "webnet" overlay network.
The --mode global option specifies that the service should run one replica per node, on all nodes which provide the "webnet" network. Therefore, the service runs on all nodes which provide the network "webnet".
Option B is incorrect because the --mode global option ensures that the service runs once on each node that provides the specified network.
while a global service runs on each active node in the swarm.
https://docs.docker.com/engine/reference/commandline/service_create/
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
hmagroun
Highly Voted 3 years, 3 months agoPeixinho
Most Recent 2 months, 3 weeks ago[Removed]
1 year, 4 months agoBlob21
2 years agopavkata
3 years, 1 month ago