C.executing containers

D.maintaining cluster state

 

 

 

 

 

Answer: C

 

Explanation:

Manager nodes handle cluster management tasks:

maintaining cluster state scheduling services

serving swarm mode HTTP API endpoints Worker nodes

Worker nodes are also instances of Docker Engine whose sole purpose is to execute containers. Worker nodes don’t participate in the Raft distributed state, make scheduling decisions, or serve the swarm mode HTTP API.

Reference: https://docs.docker.com/engine/swarm/how-swarm-mode-works/nodes/#worker- nodes

 

 

 

 

 

 

 

Question: 130

You are building a Docker image with the following Dockerfile. How many layers will the resulting image have? FROM scratch

CMD /app/hello.sh

 

A.2

 

B.4

 

C.1

 

D.3

 

 

 

 

 

 

Answer: D

Explanation:

FROM scratch CMD /app/hello.sh

The image contains all the layers from the base image (only one in this case, since we’re building rom scratch), plus a new layer with the CMD instruction, and a read-write container layer.

Reference:

 

 

https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/#sharing-pro motes-smaller-images

 

 

 

 

 

 

 

Question: 131

What storage driver does Docker generally recommend that you use if it is available?

 

A.zfs

B.btrfs

 

C.aufs

 

D.overlay

 

 

 

 

 

 

Answer: C

Explanation:

After you have read the storage driver overview, the next step is to choose the best storage driver for your workloads. In making this decision, there are three high-level factors to consider:

If multiple storage drivers are supported in your kernel, Docker has a prioritized list of which storage driver to use if no storage driver is explicitly configured, assuming that the prerequisites for that storage driver are met:

If aufs is available, default to it, because it is the oldest storage driver. However, it is not universally available.

Reference: https://docs.docker.com/engine/userguide/storagedriver/selectadriver/

 

 

 

 

 

 

 

Question: 132

In which Docker Swarm model does the swarm manager distribute a specific number of replica tasks among the nodes based upon the scale you set in the desired state?

 

A.distributed services

 

B.scaled services

 

C.replicated services

 

D.global services

 

 

 

 

 

Answer: D

Explanation:

 

 

A service is the definition of the tasks to execute on the worker nodes. It is the central structure of the swarm system and the primary root of user interaction with the swarm.

When you create a service, you specify which container image to use and which commands to execute inside running containers.

In the replicated services model, the swarm manager distributes a specific number of replica tasks among the nodes based upon the scale you set in the desired state.

For global services, the swarm runs one task for the service on every available node in the cluster. A task carries a Docker container and the commands to run inside the container. It is the atomic scheduling unit of swarm. Manager nodes assign tasks to worker nodes according to the number of replicas set in the service scale. Once a task is assigned to a node, it cannot move to another node. It can only run on the assigned node or fail.

Reference: https://docs.docker.com/engine/swarm/key-concepts/#services-and-tasks

 

 

 

 

 

 

 

Question: 133

On which local address does the Docker DNS server listen? A.127.0.0.1

B.127.0.0.111

 

C.127.0.0.254

 

D.127.0.0.11

 

 

 

 

 

 

Answer: D

Explanation:

Note: If you need access to a host’s localhost resolver, you must modify your DNS service on the host to listen on a non-localhost address that is reachable from within the container.

Note: The DNS server is always at 127.0.0.11.

Reference: https://docs.docker.com/engine/userguide/networking/configure-dns/

 

 

 

 

 

 

 

Question: 134

What are the default memory limit policies for a Docker container?

 

A.Limited memory, limited kernel memory

 

B.Unlimited memory, limited kernel memory

 

C.Limited memory, unlimited kernel memory

 

 

D.Unlimited memory, unlimited kernel memory

 

 

 

 

 

 

 

Answer: D

Explanation:

Kernel memory limits are expressed in terms of the overall memory allocated to a container. Consider the following scenarios:

Unlimited memory, unlimited kernel memory: This is the default behavior.

Unlimited memory, limited kernel memory: This is appropriate when the amount of memory needed by all cgroups is greater than the amount of memory that actually exists on the host machine. You can configure the kernel memory to never go over what is available on the host machine, and containers which need more memory need to wait for it.

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

发表评论

电子邮件地址不会被公开。 必填项已用*标注

error: Content is protected !!