Docker Certified Associate (DCA) Practice Tests Set 5

In which state are service’s tasks initialized?


Options are :

  • INIT
  • NEW (Correct)
  • STARTING
  • PENDING

Answer :NEW

Docker Certified Associate (DCA) Practice Exams Set 16

What is the swarm unit that determines on which node a task will be scheduled?


Options are :

  • Scheduler
  • Orchestrator
  • Allocator
  • Dispatcher (Correct)

Answer :Dispatcher

Which of the following commands will show a list of volumes for a specific container?


Options are :

  • docker volume logs nginx --containers
  • docker container inspect nginx (Correct)
  • docker volume inspect nginx
  • docker container logs nginx --volumes

Answer :docker container inspect nginx

What docker command can you use to add or update a mount on an existing service?


Options are :

  • docker service set --add-update-mount
  • docker service --mount-volume
  • docker service --add-update-mount
  • docker service update --mount-add (Correct)

Answer :docker service update --mount-add

Docker and Containers: Commands Set 1

Which of the following commands will create a service called "dns_cache" in the swarm which only listens on port 53 using the UDP protocol?


Options are :

  • docker service create --name dns-cache -p 53:53 --service udp dns-cache
  • docker service create --name dns-cache -p 53:53/udp dns-cache (Correct)
  • docker service create --name dns-cache -p 53:53 --udp dns-cache
  • docker service create --name dns-cache -p 53:53 --constraint networking-protocol-udp=true dns-cache

Answer :docker service create --name dns-cache -p 53:53/udp dns-cache

What kind of resource should you use when creating Pods that are expected to terminate, such as batch computations?


Options are :

  • Job (Correct)
  • StatefulSet
  • Deployment
  • DaemonSet

Answer :Job

What docker command can you use to remove a published port?


Options are :

  • docker service update --publish-port-rm
  • docker service modify --publish-port-rm
  • docker service update --rm-port
  • docker service update --publish-rm (Correct)

Answer :docker service update --publish-rm

Docker Certified Associate 2020 - Practice Exams - NEW Set 5

How can you deploy a new service with 4 instances of nginx with a single command?


Options are :

  • docker service scale --replicas 4 --name myservice nginx
  • docker service scale myservice=4 nginx
  • docker service create --instances 4 --name myservice nginx
  • docker service create --replicas 4 --name myservice nginx (Correct)

Answer :docker service create --replicas 4 --name myservice nginx

Which of the following commands can you use to roll back to the previous version of a service?


Options are :

  • docker service update --rollback (Correct)
  • docker service --rollback-version
  • docker service update --rollback-version
  • docker service --rollback

Answer :docker service update --rollback

When there are seven managers in a swarm cluster, how would they be distributed across three datacenters or availability zones?


Options are :

  • 5/1/1
  • 4/2/1
  • 3/2/2 (Correct)
  • 3/3/1

Answer :3/2/2

Docker Certified Associate (DCA) Practice Exams Set 10

How do you view the list of historical tasks for a service called "redis" by using the command line?


Options are :

  • docker ps redis
  • docker service ps redis (Correct)
  • docker service inspect redis
  • docker inspect redis

Answer :docker service ps redis

Which swarm unit is in charge to pass a task to its corresponding node using the HTTP request/response protocol?


Options are :

  • Allocator
  • Dispatcher
  • Scheduler
  • Orchestrator (Correct)

Answer :Orchestrator

What kind of format is used for the output when the --pretty flag is not specified for the docker service inspect command?


Options are :

  • json (Correct)
  • yaml
  • txt
  • xml

Answer :json

Docker Certified Associate (DCA) Practice Test Set 3

Which of the following is not a supported orchestrator in Docker EE?


Options are :

  • Kubernetes
  • Docker Swarm
  • Minikube (Correct)
  • Swarmkit

Answer :Minikube

Which of the following is the correct order of steps taken when creating a service process in swarm mode?


Options are :

  • docker API > orchestrator > dispatcher > allocator > orchestrator
  • docker API > scheduler > allocator > dispatcher > orchestrator
  • docker API > orchestrator > allocator > dispatcher > scheduler (Correct)
  • docker API > allocator > scheduler > dispatcher > orchestrator

Answer :docker API > orchestrator > allocator > dispatcher > scheduler

Bob has an application that consists of multiple different services that interact with one another. What should he use to manage his services in a Docker Swarm?


Options are :

  • Bob should use a task.
  • Bob should use docker-compose.
  • Bob should use a service with multiple tasks.
  • Bob should use a stack. (Correct)

Answer :Bob should use a stack.

Docker Certified Associate (DCA) Practice Exams Set 27

Which of the following fields are required in the YAML file when defining a Kubernetes object? (Select all that apply)


Options are :

  • kind (Correct)
  • selector
  • spec (Correct)
  • apiVersion (Correct)

Answer :kind spec apiVersion

What is the difference between a replicated service and a global service?


Options are :

  • Replicated service runs one task on every node. Global service runs multiple task on every node
  • A number of tasks can be specified for a replicated service. There is no pre-specified number of tasks for global service (Correct)
  • Replicated service can only be deployed on manager node. Global service can be deployed on both manager and worker node
  • Good candidates for replicated service are monitoring agents that you want to run on every node in the swarm. Good candidates for global service are http servers.

Answer :A number of tasks can be specified for a replicated service. There is no pre-specified number of tasks for global service

In which of the following scenarios might services remain in a pending state?


Options are :

  • All of the scenarios are valid (Correct)
  • All nodes are paused or drained
  • The amount of memory reserved for a service cannot be satisfied
  • When imposed placement constraints cannot be honored

Answer :All of the scenarios are valid

Docker and Containers: Commands Set 1

You have been asked to backup the swarm state on a Linux installation. By default, where can you find the swarm state and logs stored on the manager nodes?


Options are :

  • /etc/docker/swarm
  • /var/lib/docker/swarm (Correct)
  • /var/run/docker/swarm
  • /run/docker/swarm

Answer :/var/lib/docker/swarm

Without the quorum, administrative tasks are not possible, including scaling or updating services and joining or removing nodes from the swarm.


Options are :

  • TRUE (Correct)
  • FALSE

Answer :TRUE

Which of the following is not a configuration option you can use when creating a docker service?


Options are :

  • --network
  • --mount
  • --volume (Correct)
  • --secret

Answer :--volume

Docker Certified Associate (DCA) Practice Test Set 4

Which of the following commands can you use to pretty-print the containers IDs, names, and statuses in tabular form?


Options are :

  • docker ps --format table {?{.ID}} {?{.Names}} {?{.Status}}
  • docker ps --format {?{.ID}} {?{.Names}} {?{.Status}}
  • docker ps -format table {?{.ID}} {?{.Names}} {?{.Status}}
  • docker ps --format "table {?{.ID}} {?{.Names}} {?{.Status}}" (Correct)

Answer :docker ps --format "table {?{.ID}} {?{.Names}} {?{.Status}}"

Which of the following are valid use cases for Kubernetes Deployments? (Select all that apply)


Options are :

  • Declare a new state of the Pods. (Correct)
  • To rollout a ReplicaSet. (Correct)
  • Maintains a sticky identity for each Pod.
  • Scale up to facilitate more load. (Correct)

Answer :Declare a new state of the Pods. To rollout a ReplicaSet. Scale up to facilitate more load.

Which of the following commands can you use to view detailed metadata about a container? (select two)


Options are :

  • docker query
  • docker inspect (Correct)
  • docker metadata
  • docker container inspect (Correct)

Answer :docker inspect docker container inspect

Docker Certified Associate 2020 - Practice Exams - NEW Set 8

Which of the following are valid fields to instruct the kube-scheduler on how to place each incoming Pod across your cluster? (Select all that apply)


Options are :

  • whenUnsatisfiable (Correct)
  • maxSkew (Correct)
  • global
  • topologyKey (Correct)

Answer :whenUnsatisfiable maxSkew topologyKey

Which are the two types of docker swarm services?


Options are :

  • distributed and replicated services
  • local and global services
  • replicated and global services (Correct)
  • replicated and local services

Answer :replicated and global services

Which constraint role you use if you want to restrict a service to be scheduled only on the worker nodes in the Swarm cluster?


Options are :

  • swarm.role == worker
  • swarm.role != manager
  • node.role == worker (Correct)
  • node.role != worker

Answer :node.role == worker

Docker Certified Associate (DCA) Practice Exams Set 25

Which of the following commands will ensure that a container uses a maximum of 1 GB of active memory?


Options are :

  • docker run --memory-reservation 1G nginx
  • docker run --memory 1G nginx (Correct)
  • docker run --memory-swap 1G nginx
  • docker run --memory-swap 2G --memory-reservation 1G

Answer :docker run --memory 1G nginx

Which availability mode needs to be set on a node when you need to perform maintenance on a node?


Options are :

  • MAINTENANCE
  • DRAIN (Correct)
  • OFFLINE
  • EVACUATE

Answer :DRAIN

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions