0
0
Dockerdevops~10 mins

Manager and worker nodes in Docker - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to initialize a Docker Swarm manager node.

Docker
docker swarm [1]
Drag options to blanks, or click blank then click option'
Acreate
Bjoin
Cstart
Dinit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'join' instead of 'init' to start the swarm.
2fill in blank
medium

Complete the command to add a worker node to the swarm using a token.

Docker
docker swarm [1] --token SWMTKN-1-0-xyz 192.168.1.10:2377
Drag options to blanks, or click blank then click option'
Acreate
Bjoin
Cstart
Dinit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'init' instead of 'join' to add a worker node.
3fill in blank
hard

Fix the error in the command to list all nodes in the swarm.

Docker
docker node [1]
Drag options to blanks, or click blank then click option'
Alist
Bshow
Cls
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'list' or 'show' which are invalid commands here.
4fill in blank
hard

Fill both blanks to create a service that runs on worker nodes only.

Docker
docker service create --name myservice --constraint 'node.role [1] [2]' nginx
Drag options to blanks, or click blank then click option'
A==
B!=
Cworker
Dmanager
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' or 'manager' which exclude workers.
5fill in blank
hard

Fill all three blanks to update a service to run only on manager nodes with 3 replicas.

Docker
docker service update --replicas [1] --constraint-add 'node.role [2] [3]' myservice
Drag options to blanks, or click blank then click option'
Aworker
B3
C==
Dmanager
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'worker' role or wrong operators.