Docker Certified Associate (DCA) Exam Questions and Answers
Will this Linux kernel facility limit a Docker container's access to host resources, such as CPU or memory?
Solution: namespaces
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.
Is this a type of Linux kernel namespace that provides container isolation?
Solution. Process ID
Will this sequence of steps completely delete an image from disk in the Docker Trusted Registry?
Solution. Delete the image and delete the image repository from Docker Trusted Registry.
Will this action upgrade Docker Engine CE to Docker Engine EE?
Solution. Disable the Docker service via ‘chkconfig' or 'systemctl'.
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: Kubernetes automatically triggers a user-defined script to attempt to fix the unhealthy container.
Seven managers are in a swarm cluster.
Is this how should they be distributed across three datacenters or availability zones?
Solution: 3-3-1
Will this command ensure that overlay traffic between service tasks is encrypted?
Solution: docker service create --network --secure
Is this a Linux kernel namespace that is disabled by default and must be enabled at Docker engine runtime to be used?
Solution: net
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 images that contain the specific configuration for every environment.
Will this command ensure that overlay traffic between service tasks is encrypted?
Solution. docker network create -d overlay --secure
Is this a Linux kernel namespace that is disabled by default and must be enabled at Docker engine runtime to be used?
Solution: mnt
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: Set the log-driver and log-oPt keys to values for the logging solution (Splunk) In the daemon.json file.
Will this command ensure that overlay traffic between service tasks is encrypted?
Solution: docker service create --network --encrypted
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
Does this command create a swarm service that only listens on port 53 using the UDP protocol?
Solution: ‘docker service create -name dns-cache -p 53:53 -service udp dns-cache'
Which docker run` flag lifts cgroup limitations?
Is this an advantage of multi-stage builds?
Solution: faster image builds by allowing parallel execution of Docker builds
Is this statement correct?
Solution: A Dockerfile provides instructions for building a Docker image
Will this command list all nodes in a swarm cluster from the command line?
Solution. ‘docker inspect nodes
In Kubernetes, to mount external storage to a filesystem path in a container within a pod, you would use a volume in the pod specification. This volume is populated with a persistentVolumeClaim that is bound to an existing persistentVolume. The persistentVolume is defined and managed by the storageClass which provides dynamic or static provisioning of the volume and determines what type of storage will be provided1. References:
•Dynamic Volume Provisioning | Kubernetes
Is this a supported user authentication method for Universal Control Plane?
Solution: Docker ID
You want to create a container that is reachable from its host's network.
Does this action accomplish this?
Solution. Use either EXPOSE or -publish to access the container on the bridge network.
Is this a supported user authentication method for Universal Control Plane?
Solution. x.500
The following Docker Compose file is deployed as a stack:
Is this statement correct about this health check definition?
Solution: Health checks test for app health ten seconds apart. Three failed health checks transition the container into “unhealthy” status.
Seven managers are in a swarm cluster.
Is this how should they be distributed across three datacenters or availability zones?
Solution: 5-1-1
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 events deployment api
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. Set containers. Mounts. hostBinding: /data in the container's specification.
The Kubernetes yaml shown below describes a clusterIP service.
Is this a correct statement about how this service routes requests?
Solution: Traffic sent to the IP of this service on port 8080 will be routed to port 80 in a random pod with the label aPP: nginx.
Does this command create a swarm service that only listens on port 53 using the UDP protocol?
Solution. ‘docker service create -name dns-cache -p 53:53 -udp dns-cache’
Will this configuration achieve fault tolerance for managers in a swarm?
Solution: one manager node for two worker nodes
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. label constraints
Is this the purpose of Docker Content Trust?
Solution. Sign and verify image tags.
In the context of a swarm mode cluster, does this describe a node?
Solution. an instance of the Docker CLI connected to the swarm
You created a new service named 'http' and discover it is not registering as healthy. Will this command enable you to view the list of historical tasks for this service?
Solution: 'docker inspect http'
The Kubernetes yaml shown below describes a networkPolicy.
Will the networkPolicy BLOCK this trafftc?
Solution. a request issued from a pod bearing only the tier: frontend label, to a pod bearing the tier: backend label
You created a new service named 'http' and discover it is not registering as healthy. Will this command enable you to view the list of historical tasks for this service?
Solution: 'docker service inspect http'
Will this command list all nodes in a swarm cluster from the command line?
Solution: 'docker node Is'
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
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
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 system events --filter splunk
In Docker Trusted Registry, is this how a user can prevent an image, such as 'nginx:latest’, from being overwritten by another user with push access to the repository?
Solution: Remove push access from all other users.
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: node affinities
Is this a way to configure the Docker engine to use a registry without a trusted TLS certificate?
Solution: List insecure registries in the 'daemon.json configuration file under the \insecure-registries' key.
Seven managers are in a swarm cluster.
Is this how should they be distributed across three datacenters or availability zones?
Solution: 3-2-2
You configure a local Docker engine to enforce content trust by setting the environment variable
DOCKER_CONTENT_TRUST=1.
If myorg/myimage: 1.0 is unsigned, does Docker block this command?
Solution: docker image inspect myorg/myimage: 1.0
Will this command mount the host's '/data' directory to the ubuntu container in read-only mode?
Solution: 'docker run -v /data:/mydata --mode readonly ubuntu'
The following Docker Compose file is deployed as a stack:
Is this statement correct about this health check definition?
Solution. Health checks lest for app health ten seconds apart. Three failed health checks transition the container into "unhealthy" status.
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. Create a collection for for each application.
Can this set of commands identify the published port(s) for a container?
Solution. ‘docker port inspect", docker container inspect"
Will this configuration achieve fault tolerance for managers in a swarm?
Solution: an odd number of manager nodes, totaling more than two
Will this action upgrade Docker Engine CE to Docker Engine EE?
Solution. Run docker engine activate.
The Kubernetes yaml shown below describes a networkPolicy.
Will the networkPolicy BLOCK this trafftc?
Solution. a request issued from a pod bearing the tier: api label, to a pod bearing the tier: backend label
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 run -- log driver=splunk for every container at run time
In Docker Trusted Registry, is this how a user can prevent an image, such as 'nginx:latest’, from being overwritten by another user with push access to the repository?
Solution: Use the DTR web Ul to make all tags in the repository immutable.