




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Information Technology / Cloud Computing Exam coverage :-
A) Deploy all three nodes as worker nodes and use an external load balancer for management B) Deploy one manager node and two worker nodes, with the manager node backed up regularly C) Deploy three manager nodes in the swarm cluster to achieve
D) Deploy two manager nodes and one worker node, with automatic failover configured Rationale : A Docker Swarm cluster requires a quorum of manager nodes to maintain cluster state. With three manager nodes, the cluster can tolerate the failure of one manager and still maintain quorum (majority of 2 out of 3). Two managers would lose quorum if one fails, and a single manager is a single point of failure.
C) docker node ls to check node availability D) docker swarm init to reinitialize the cluster Rationale : docker service inspect --pretty displays the service configuration, including constraints, resource limits, and placement preferences. This helps identify misconfigurations preventing task deployment. docker service logs only shows logs from running tasks.
B) docker service create --constraint node.labels.storage==ssd
C) docker service create --placement-pref node.labels.storage==ssd nginx D) docker service create --label storage=ssd nginx Rationale : Node labels can be used as placement constraints with the syntax node.labels.==. This ensures tasks are only scheduled on nodes with the matching label.
D) docker stats to view resource usage Rationale : docker inspect returns detailed JSON output containing all configuration details of a container, including network settings, mounts, environment variables, and labels.
C) Set --mode replicated with no replica count and rely on Swarm auto-scaling D) Configure --scale in the Docker Compose file and deploy with docker compose up Rationale : Replicated services allow you to specify the number of replicas and Swarm ensures that many tasks are running. Scaling can be adjusted manually with docker service scale or integrated with external auto-scaling solutions.
C) docker inspect web D) docker events --filter service=web Rationale : docker service ps --no-trunc shows the current state of tasks, including error messages when tasks fail to start. The --no- trunc flag ensures full error messages are displayed.
C) docker stack scale api= D) docker compose up --scale api= Rationale : docker service scale is the command used to scale a service in a Swarm cluster. The syntax is docker service scale =.
B) Swarm does not support depends_on; the developer should use
C) depends_on is ignored in swarm mode but services start in the order defined in the Compose file D) Swarm supports depends_on only for global services Rationale : Docker Swarm does not honor the depends_on directive from Compose files. Services should be designed to handle dependencies gracefully, or health checks with update_config can be used to control rolling updates.
B) docker swarm init --lock C) docker swarm unlock
D) docker swarm update --lock Rationale : docker swarm lock enables the lock on the swarm. When locked, managers must use the unlock key to restart, preventing access to the swarm's encryption keys.
D) docker network inspect Rationale : docker inspect with the --format flag can extract specific network information from the container's configuration. This shows all networks the container is attached to.
A) docker swarm init
C) docker swarm join --worker D) docker node join --worker Rationale : docker swarm join-token worker displays the token and command needed for a new worker node to join the swarm. The manager must run this command to generate the join token.
C) docker node ps
D) docker service inspect Rationale : docker service ps lists all tasks of a service, showing the node each task is running on, the current state, and any errors.
C) --hostname {{.Node.Hostname}} D) --label node={{.Node.Hostname}} Rationale : Docker Swarm supports templating in service creation. The --template-driver flag enables Go templating for fields like service name, hostname, and labels.
A) docker stack deploy - c docker-compose.yml myapp --replicas api= B) docker stack deploy - c docker-compose.yml myapp and then
C) docker compose up - d --scale api= D) docker stack deploy - c docker-compose.yml myapp --scale api= Rationale : The docker stack deploy command does not have a -- scale flag. The recommended approach is to deploy the stack and then scale the service using docker service scale.
C) The UCP (Universal Control Plane) D) External Let's Encrypt integration Rationale : Docker Swarm has an internal CA that automatically rotates certificates for nodes and services. The CA is managed by the swarm itself and ensures secure communication between nodes.
B) docker network create mynet C) docker network create --driver overlay mynet D) docker network new mynet
C) docker container logs D) docker service logs Rationale : docker logs displays the logs from a container. This is the primary command for troubleshooting container startup issues.
C) --mode global D) --constraint node.hostname!=master Rationale : --placement-pref spread= distributes tasks evenly across nodes based on the specified attribute. spread=node.id distributes tasks across all nodes.
B) docker node update --role worker C) docker node rm D) docker swarm demote