Docker Certified Associate DCA Exam Questions

Page: 1 / 14
Total 191 questions
Question 1

Your organization has a centralized logging solution, such as Splunk.

Will this configure a Docker container to export container logs to the logging solution?

Solution: docker logs



Answer : B

= The commanddocker logs <container-id>will not configure a Docker container to export container logs to the logging solution, such as Splunk.This command only displays the logs of a specific container in the standard output or a file, but does not send them to any external system1.To export container logs to Splunk, you need to use the Docker Logger Drivers, which are plugins that provide logging capabilities for Docker containers2.The Splunk logging driver sends container logs to HTTP Event Collector in Splunk Enterprise and Splunk Cloud3.To use the Splunk logging driver for a specific container, you need to use the command-line flags--log-driverand--log-optwithdocker run, and provide the Splunk token and URL as options3. For example:

$ docker run --log-driver=splunk --log-opt splunk-token=VALUE --log-opt splunk-url=VALUE ...

:

docker logs | Docker Documentation

Logging drivers | Docker Documentation

Splunk logging driver | Docker Documentation


Question 2

Is this a type of Linux kernel namespace that provides container isolation?

Solution: Storage



Answer : B

= Storage is not a type of Linux kernel namespace that provides container isolation.Linux namespaces are a feature of the Linux kernel that partitions kernel resources such that one set of processes sees one set of resources while another set of processes sees a different set of resources1. The feature works by having the same namespace for a set of resources and processes, but those namespaces refer to distinct resources.Since kernel version 5.6, there are 8 kinds of namespaces: mount, UTS, IPC, PID, network, user, cgroup, and time2.Each kind of namespace isolates a different aspect of the system, such as file system mounts, host and domain names, inter-process communication, process IDs, network interfaces, user and group IDs, cgroups, and system time2. Storage is not one of them.Reference:

1: Linux namespaces - Wikipedia

2: Namespaces --- The Linux Kernel documentation


Question 3

An application image runs in multiple environments, with each environment using different certificates and ports.

Is this a way to provision configuration to containers at runtime?

Solution: Provision a Docker config object for each environment.



Answer : A

= Provisioning a Docker config object for each environment is a way to provision configuration to containers at runtime. Docker configs allow services to adapt their behaviour without the need to rebuild a Docker image. Services can only access configs when explicitly granted by a configs attribute within the services top-level element.As with volumes, configs are mounted as files into a service's container's filesystem1.Docker configs are supported on both Linux and Windows services2.Reference:Docker Documentation,Configs top-level element


Question 4

A company's security policy specifies that development and production containers must run on separate nodes in a given Swarm cluster. Can this be used to schedule containers to meet the security policy requirements?

Solution.environment variables



Answer : B

Environment variables cannot be used to schedule containers to meet the security policy requirements.Environment variables are used to pass configuration data to the containers, not to control where they run1.To schedule containers to run on separate nodes in a Swarm cluster, you need to use node labels and service constraints23.Node labels are key-value pairs that you can assign to nodes to organize them into groups4. Service constraints are expressions that you can use to limit the nodes where a service can run based on the node labels. For example, you can label some nodes asenv=devand others asenv=prod, and then use the constraint--constraint node.labels.env==devor--constraint node.labels.env==prodwhen creating a service to ensure that it runs only on the nodes with the matching label.Reference:

1: Environment variables in Compose | Docker Docs

2: Deploy services to a swarm | Docker Docs

3: How to use Docker Swarm labels to deploy containers on specific nodes

4: Manage nodes in a swarm | Docker Docs

[5]: Swarm mode routing mesh | Docker Docs

[6]: Docker Swarm - How to set environment variables for tasks on various nodes


Question 5

Will this configuration achieve fault tolerance for managers in a swarm?

Solution: only two managers, one active and one passive.



Answer : B

= The configuration willnotachieve fault tolerance for managers in a swarm, because it does not have enough managers to form a quorum. A quorum is the minimum number of managers that must be available to agree on values and maintain the consistent state of the swarm. The quorum is calculated as (N/2)+1, where N is the number of managers in the swarm. For example, a swarm with 3 managers has a quorum of 2, and a swarm with 5 managers has a quorum of 3. Having only two managers, one active and one passive, means that the quorum is also 2. Therefore, if one manager fails or becomes unavailable, the swarm will lose the quorum and will not be able to process any requests or schedule any tasks. To achieve fault tolerance, a swarm should have an odd number of managers, at least 3, and no more than 7. This way, the swarm can tolerate the loss of up to (N-1)/2 managers and still maintain the quorum and the cluster state.Reference:

Administer and maintain a swarm of Docker Engines

Raft consensus in swarm mode

How nodes work


Question 6

In the context of a swarm mode cluster, does this describe a node?

Solution.an instance of the Docker CLI connected to the swarm



Answer : B

The statement doesnotdescribe a node in the context of a swarm mode cluster.A node is a physical or virtual machine running Docker Engine 1.12 or later in swarm mode1.An instance of the Docker CLI connected to the swarm is not a node, but a client that can interact with the swarm through the Docker API2.The Docker CLI can be used to create a swarm, join nodes to a swarm, deploy services to a swarm, and manage swarm behavior3.Reference:How nodes work),Docker CLI),Swarm mode overview)


Question 7

Will this action upgrade Docker Engine CE to Docker Engine EE?

Solution: Manually download the 'docker-ee' package



Answer : B

= Manually downloading the 'docker-ee' package will not upgrade Docker Engine CE to Docker Engine EE. Docker Engine CE and Docker Engine EE are two different products with different installation methods and features.Docker Engine CE is a free and open source containerization platform, while Docker Engine EE is a subscription-based enterprise-grade platform that offers additional features such as security scanning, certified plugins, and support12.To upgrade from Docker Engine CE to Docker Engine EE, you need to uninstall Docker Engine CE and install Docker Engine EE following the official documentation3.Reference:

What is the exact difference between Docker EE (Enterprise Edition), Docker CE (Community Edition) and Docker (Custom Support) - Stack Overflow

Difference between Docker Community Edition (CE) vs Docker Enterprise Edition (EE) in 2020

Install Docker Engine | Docker Docs


Page:    1 / 14   
Total 191 questions