DCA Exam Practice Questions prepared by Docker Professionals
Use Valid New DCA Questions - Top choice Help You Gain Success
NEW QUESTION # 63
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.
- A. No
- B. Yes
Answer: B
Explanation:
Explanation
Provisioning a Docker config object for each environment is a way to provision configuration to containers at runtime. A Docker config object is a file that contains configuration data for an application or service. It can be created using the docker config create command and then attached to a service using the --config flag of the docker service create or update command. This allows different configurations to be applied to different environments without changing the image or the code of the application. References:
https://docs.docker.com/engine/swarm/configs/,
https://docs.docker.com/engine/reference/commandline/config_create/
NEW QUESTION # 64
An application image runs in multiple environments, and each environment uses different certificates and ports, what is the best practice to deploy the containers?
- A. Create a config file for each environment.
- B. Create a Dockerfile for each environment, specifying ports and Docker secrets for certificates.
- C. Create a Dockerfile for each environment, specifying ports and ENV variables for certificates.
- D. Create images that contain the specific configuration for every environment.
Answer: A
NEW QUESTION # 65
During development of an application meant to be orchestrated by Kubernetes, you want to mount the /data directory on your laptop into a container.
Will this strategy successfully accomplish this?
Solution: Create a PersistentVolume with storageciass: "" and hostPath: /data, and a persistentVolumeClaim requesting this PV. Then use that PVC to populate a volume in a pod
- A. No
- B. Yes
Answer: B
NEW QUESTION # 66
Which command interactively monitors all container activity in the Docker engine?
- A. docker system logs
- B. docker system events
- C. docker container events
- D. docker container logs
Answer: B
NEW QUESTION # 67
Seven managers are in a swarm cluster.
Is this how should they be distributed across three datacenters or availability zones?
Solution: 5-1-1
- A. Yes
- B. No
Answer: B
Explanation:
Explanation
This is not how they should be distributed across three datacenters or availability zones, because having one manager in two datacenters or availability zones creates a risk of losing quorum if those datacenters or availability zones become unavailable. According to the official documentation, managers should be distributed evenly across datacenters or availability zones to ensure that the swarm can survive the loss of any one datacenter or availability zone.
References: https://docs.docker.com/engine/swarm/admin_guide/#add-manager-nodes-for-fault-tolerance
NEW QUESTION # 68
Is this a type of Linux kernel namespace that provides container isolation?
Solution: Authentication
- A. No
- B. Yes
Answer: B
NEW QUESTION # 69
Two development teams in your organization use Kubernetes and want to deploy their applications while ensuring that Kubernetes-specific resources, such as secrets, are grouped together for each application.
Is this a way to accomplish this?
Solution: Add all the resources to the default namespace.
- A. Yes
- B. No
Answer: B
Explanation:
Explanation
This is not a way to accomplish this, because adding all the resources to the default namespace is not a good practice for isolating applications in Kubernetes. According to the official documentation, namespaces are used to group resources into logical units that correspond to different projects, teams, or environments. Using namespaces can help avoid naming collisions and enforce resource quotas and access policies.
References: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
NEW QUESTION # 70
What behavior is expected when a service is created with the following command:
'docker service create --publish 8000:80 nginx'
- A. Only a single node in the cluster will listen on port 8080 and forward to port 80 in the container.
- B. All nodes in the cluster will listen on port 8080 and forward to port 80 in the container.
- C. Only a single node in the cluster will listen on port 80 and forward to port 8080 in the container.
- D. All nodes in the cluster will listen on port 80 and forward to port 8080 in the container.
Answer: B
NEW QUESTION # 71
Is this a Linux kernel namespace that is disabled by default and must be enabled at Docker engine runtime to be used?
Solution: user
- A. No
- B. Yes
Answer: B
NEW QUESTION # 72
What is the difference between the ADD and COPY dockerfile instructions? (choosen 2)
- A. ADD supports regular expression handling while COPY does not.
- B. COPY supports regular expression handling while ADD does not.
- C. ADD supports compression format handling while COPY does not.
- D. COPY supports compression format handling while ADD does not.
- E. ADD support remote URL handling while COPY does not.
Answer: E
NEW QUESTION # 73
Will this action upgrade Docker Engine CE to Docker Engine EE?
Solution: Uninstall 'docker-ce' package before installing 'docker-ee' package.
- A. No
- B. Yes
Answer: B
NEW QUESTION # 74
In Docker Trusted Registry, how would a user prevent an image, for example 'nginx:latest' from being overwritten by another user with push access to the repository?
- A. Keep a backup copy of the image on another repository.
- B. Use the DTR web UI to make the tag immutable.
- C. Tag the image with 'nginx:immutable'
- D. Remove push access from all other users.
Answer: B
NEW QUESTION # 75
Will this configuration achieve fault tolerance for managers in a swarm?
Solution: an odd number of manager nodes, totaling more than two
- A. No
- B. Yes
Answer: B
NEW QUESTION # 76
A docker service 'web' is running with a scale factor of 1 (replicas = 1).
Bob intends to use the command 'docker service update --replicas=3 web'.
Alice intends to use the command 'docker service scale web=3'.
How do the outcomes oft these two commands differ?
- A. Bob's command updates the number of replicas of the 'web' service to 3. Alice's command results in an error.
- B. Both Bob's and Alice's commands result in exactly the same outcome, which is 3 instances of the 'web' service.
- C. Bob's command only updates the service definition, but no new replicas are started. Alice's command
results in the actual scaling up of the 'web' service. - D. Bob's command results in an error. Alice's command updates the number of replicas of the 'web' service to 3.
Answer: B
NEW QUESTION # 77
Does this describe the role of Control Groups (cgroups) when used with a Docker container?
Solution: user authorization to the Docker API
- A. Yes
- B. No
Answer: B
Explanation:
Explanation
This does not describe the role of Control Groups (cgroups) when used with a Docker container, because user authorization to the Docker API is not related to cgroups. According to the official documentation, cgroups are a Linux kernel feature that limits and isolates the resource usage of a group of processes, such as CPU, memory, disk I/O, network, etc. Docker can use cgroups to share available hardware resources to containers and optionally enforce limits and constraints.
References: https://docs.docker.com/config/containers/runmetrics/
https://bikramat.medium.com/namespace-vs-cgroup-60c832c6b8c8
NEW QUESTION # 78
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. Create a Dockerfile for each environment, specifying ports and Docker secrets for certificates.
- A. Yes
- B. No
Answer: B
Explanation:
Explanation
Creating a Dockerfile for each environment, specifying ports and Docker secrets for certificates, is not a way to provision configuration to containers at runtime. A Dockerfile defines the configuration of an image at build time, not at runtime. Creating a different Dockerfile for each environment is not a good practice, as it introduces duplication and inconsistency. To provision configuration to containers at runtime, you can use environment variables, config objects, or command-line arguments. References:
https://docs.docker.com/engine/reference/builder/, https://docs.docker.com/engine/swarm/configs/,
https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables-e-env-env-file
NEW QUESTION # 79
Is this an advantage of multi-stage builds?
Solution: better caching when building Docker images
- A. Yes
- B. No
Answer: B
NEW QUESTION # 80
A host machine has four CPUs available and two running containers. The sysadmin would like to assign two CPUs to each container.
Which of the following commands achieves this?
- A. Set the '--cpuset-cpus' flag of the 'dockerd' process to the value 'even-spread'
- B. Set the '--cpuset-cpu's flag to '1.3' on one container and '2.4' on the other container.
- C. Set the '--cpuset-cpus' flag to '.5' on both containers
- D. Set the '--cpu-quota' flag to '1.3' on one container and '2,4' on the other container.
Answer: C
NEW QUESTION # 81
Which set of commands can identify the publishd port(s) for a container? (Choose 1.)
- A. 'docker info','docker network inspect'
- B. 'docker network inspect','docker port'
- C. 'docker port inspect', 'docker container inspect'
- D. 'docker container inspect', docker port'
Answer: D
NEW QUESTION # 82
Are these conditions sufficient for Kubernetes to dynamically provision a persistentVolume, assuming there are no limitations on the amount and type of available external storage?
Solution: A default provisioner is specified, and subsequently a persistentVolumeClaim is created.
- A. Yes
- B. No
Answer: B
NEW QUESTION # 83
You are troubleshooting a Kubernetes deployment called api, and want to see the events table for this object.
Does this command display it?
Solution: kubectl describe deployment api
- A. No
- B. Yes
Answer: B
Explanation:
Explanation
Using kubectl describe deployment api displays the events table for this object. The kubectl describe command shows detailed information about a resource, including its status and events. This command can be used to troubleshoot a deployment that is not working as expected. References:
https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#describe
NEW QUESTION # 84
A persistentVolumeClaim (PVC) is created with the specification storageClass: "", and size requirements that cannot be satisfied by any existing persistentVolume.
Is this an action Kubernetes takes in this situation?
Solution: The PVC remains unbound until a persistentVolume that matches all requirements of the PVC becomes available.
- A. No
- B. Yes
Answer: B
Explanation:
Explanation
The PVC remains unbound until a persistentVolume that matches all requirements of the PVC becomes available is an action Kubernetes takes in this situation. A persistentVolumeClaim (PVC) is a request for storage by a user. A PVC specifies the desired size, access modes, and storage class of the storage. A persistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator. A PV has a lifecycle independent of any individual pod that uses it. A PVC is automatically bound to a suitable PV based on its requirements. If no PV exists that matches the PVC, and dynamic provisioning is not enabled, then the PVC remains unbound indefinitely until a matching PV is created. References:
https://kubernetes.io/docs/concepts/storage/persistent-volumes/,
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#lifecycle-of-a-volume-and-claim
NEW QUESTION # 85
Will this command display a list of volumes for a specific container?
Solution. 'docker container inspect nginx'
- A. No
- B. Yes
Answer: B
Explanation:
Explanation
Using docker container inspect nginx does display a list of volumes for a specific container. The docker container inspect command shows low-level information about one or more containers in JSON format. This information includes various details about the container's configuration, state, network settings, mounts, etc.
To display a list of volumes for a specific container, you can either look at the Mounts section in the JSON output or use --format '{{ .Mounts }}' to filter out only that section. References:
https://docs.docker.com/engine/reference/commandline/container_inspect/,
https://docs.docker.com/engine/reference/commandline/container_inspect/#format-the-output
NEW QUESTION # 86
The Kubernetes yaml shown below describes a networkPolicy.
Will the networkPolicy BLOCK this traffic?
Solution: a request issued from a pod bearing the tier: backend label, to a pod bearing the tier: frontend label
- A. Yes
- B. No
Answer: B
NEW QUESTION # 87
One of several containers in a pod is marked as unhealthy after failing its livenessProbe many times. Is this the action taken by the orchestrator to fix the unhealthy container?
Solution: The controller managing the pod is autoscaled back to delete the unhealthy pod and alleviate load.
- A. Yes
- B. No
Answer: B
Explanation:
Explanation
The controller managing the pod is not autoscaled back to delete the unhealthy pod and alleviate load, because this is not how Kubernetes handles pod failures. According to the official documentation, Kubernetes will try to maintain the desired number of pods for each controller, and will not scale down or up based on pod health.
References:
https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#how-a-replicationcontroller-wor
NEW QUESTION # 88
......
DCA Exam Practice Materials Collection: https://www.vceengine.com/DCA-vce-test-engine.html
Get Latest and 100% Accurate DCA Exam Questions: https://drive.google.com/open?id=1_tIFTLfGZh3i2_KObXAn6wYguXzS5oKB
