Free DCA Exam Braindumps (page: 17)

Page 16 of 47

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

  1. Yes
  2. No

Answer(s): B

Explanation:

= The command kubectl logs deployment api does 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 command kubectl describe deployment api, which shows the details of the deployment, including the events.


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

  1. Yes
  2. No

Answer(s): B

Explanation:

= The command kubectl events deployment api is not a valid kubectl command. The correct command to display the events for a deployment object is kubectl get events --field-selector involvedObject.name=api. 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 use kubectl describe deployment api to see the details and the events for the deployment.


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

  1. Yes
  2. No

Answer(s): A

Explanation:

= The command kubectl describe deployment api displays 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=true with 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

  1. Yes
  2. No

Answer(s): 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-opt option. 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






Post your Comments and Discuss Docker DCA exam with other Community members:

DCA Discussions & Posts