ExamGecko
Home Home / Docker / DCA

Docker DCA Practice Test - Questions Answers, Page 8

Question list
Search
Search

List of questions

Search

Related questions











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 containers on the bridge network

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

The answer depends on whether you want to access the container from the host's network or from other containers on the same network. EXPOSE and --publish have different effects on the container's port visibility.Reference:Docker run reference,Dockerfile reference,Docker networking overview

You want to create a container that is reachable from its host's network. Does this action accomplish this?

Solution: Use network attach to access the containers on the bridge network

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

= (Please check the official Docker site for the comprehensive explanation)Reference: (Some possible references from the web search results are)

25 Free Questions on Docker Certified Associate Exam - Whizlabs

Practice Questions for Docker Certified Associate (DCA) Exam - Medium

Practice Exams (3 Sets) - Docker Certified Associate (DCA) - Udemy

Docker Certified Associate Practice Exam | +600 exam quizz - Udemy

Docker Certified Associate DCA Practice Exam | UPDATED 2023 - Udemy

I hope this helps you in your exam preparation. Good luck!

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 logs deployment api

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

= The commandkubectl logs deployment apidoes not display the events table for the deployment object, but rather the logs of the pods that belong to the deployment.To see the events table, you need to use the commandkubectl describe deployment api, which shows the details of the deployment, including the events1.Reference:Kubernetes Documentation,Practice Questions for Docker Certified Associate (DCA) Exam

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

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

= The commandkubectl events deployment apiis not a valid kubectl command.The correct command to display the events for a deployment object iskubectl get events --field-selector involvedObject.name=api12. This command uses a field selector to filter the events by the name of the involved object, which is the deployment called api.Alternatively, you can usekubectl describe deployment apito see the details and the events for the deployment3.Reference:

1: kubectl Cheat Sheet | Kubernetes

2: kubernetes - kubectl get events only for a pod - Stack Overflow

3: Kubectl: Get Events & Sort By Time - ShellHacks

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.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: A

Explanation:

= The commandkubectl describe deployment apidisplays the events table for the deployment object called api, along with other information such as labels, replicas, strategy, conditions, and pod template. The events table shows the history of actions that have affected the deployment, such as scaling, updating, or creating pods. This can help troubleshoot any issues with the deployment. To see only the events table, you can use the flag--show-events=truewith the command.Reference:

Deployments | Kubernetes

kubectl - How to describe kubernetes resource - Stack Overflow

Kubectl: Get Deployments - Kubernetes - ShellHacks

kubernetes - Kubectl get deployment yaml file - Stack Overflow

Will this Linux kernel facility limit a Docker container's access to host resources, such as CPU or memory?

Solution: seccomp

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: A

Explanation:

= Seccomp is a Linux kernel feature that allows you to restrict the actions available within the container. By using a seccomp profile, you can limit the system calls that a container can make, thus enhancing its security and isolation. Docker has a default seccomp profile that blocks some potentially dangerous system calls, such as mount, reboot, or ptrace. You can also pass a custom seccomp profile for a container using the--security-optoption. Seccomp can limit a container's access to host resources, such as CPU or memory, by blocking or filtering system calls that affect those resources, such as setpriority, sched_setaffinity, or mlock.Reference:

Seccomp security profiles for Docker

Hardening Docker Container Using Seccomp Security Profile

Will this Linux kernel facility limit a Docker container's access to host resources, such as CPU or memory?

Solution: namespaces

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: A

Explanation:

Namespaces are a Linux kernel feature that isolate containers from each other and from the host system. They limit the access of a container to host resources, such as CPU or memory, by creating a separate namespace for each aspect of a container, such as process IDs, network interfaces, user IDs, etc.This way, a container can only see and use the resources that belong to its own namespace, and not those of other containers or the host12.Reference:

Isolate containers with a user namespace | Docker Docs

Docker overview | Docker Docs

Will this Linux kernel facility limit a Docker container's access to host resources, such as CPU or memory?

Solution: cgroups

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: A

Explanation:

= (Please check the official Docker site for the comprehensive explanation)Reference: (Some possible references from the web search results are)

Docker Certified Associate (DCA) Study Guide

[Docker Certified Associate (DCA) Practice Exam Questions]

[Docker Certified Associate (DCA) Exam Preparation Guide]

I hope this helps you in your exam preparation. Good luck!

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.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: A

Explanation:

= 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

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: Add a volume to the pod that sets hostPath.path: /data, and then mount this volume into the pod's containers as desired.

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

The solution will not work because a hostPath volume mounts a file or directory from the host node's filesystem into the pod, not from the laptop1. The host node is the VM or machine where the pod is scheduled to run, not the machine where the kubectl commands are executed. Therefore, the /data directory on the laptop will not be accessible to the pod unless it is also present on the host node.A better solution would be to use a persistent volume that can be accessed from any node in the cluster, such as NFS, AWS EBS, or Azure Disk2.Reference:

1: Volumes | Kubernetes

2: Persistent Volumes | Kubernetes

Total 183 questions
Go to page: of 19