0% found this document useful (0 votes)
174 views11 pages

CKA Questions

The document contains 5 questions and answers related to the Certified Kubernetes Administrator (CKA) exam. The questions cover topics like monitoring pod logs and writing them to a file, listing persistent volumes sorted by capacity and saving output to a file, using a DaemonSet to ensure a single instance of a pod runs on each node, adding an init container to create a file, and creating a pod with multiple containers.

Uploaded by

Enes Pekdas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
174 views11 pages

CKA Questions

The document contains 5 questions and answers related to the Certified Kubernetes Administrator (CKA) exam. The questions cover topics like monitoring pod logs and writing them to a file, listing persistent volumes sorted by capacity and saving output to a file, using a DaemonSet to ensure a single instance of a pod runs on each node, adding an init container to create a file, and creating a pod with multiple containers.

Uploaded by

Enes Pekdas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Linux Foundation

CKA Exam
Certified Kubernetes Administrator (CKA) Program
Questions & Answers
Demo
Questions & Answers PDF Page 2

Version: 8.0

Question: 1

Monitor the logs of pod foo and:


Extract log lines corresponding to error
unable-to-access-website
Write them to
/opt/KULM00201/foo

Answer: See the


solution below.

Explanation:
solution
Questions & Answers PDF Page 3
Questions & Answers PDF Page 4

Question: 2

List all persistent volumes sorted by capacity, saving the full kubectl output to
/opt/KUCC00102/volume_list. Use kubectl 's own functionality for sorting the output, and do not
manipulate it any further.

Answer: See the


solution below.

Explanation:
solution

Question: 3

Ensure a single instance of pod nginx is running on each node of the Kubernetes cluster where nginx also
represents the Image name which has to be used. Do not override any taints currently in place.
Use DaemonSet to complete this task and use ds-kusc00201 as DaemonSet name.

Answer: See the


Questions & Answers PDF Page 5

solution below.

Explanation:
solution
Questions & Answers PDF Page 6
Questions & Answers PDF Page 7

Question: 4

Perform the following tasks:


Add an init container to hungry-bear (which has been defined in spec file /opt/KUCC00108/pod-spec-
KUC
C00108.yaml
)
The init container should create an empty file named
/workdir/calm.txt
If /workdir/calm.txt is not detected, the pod should exit
Once the spec file has been updated with the init container definition, the pod should be created

Answer: See the


solution below.

Explanation:
solution
Questions & Answers PDF Page 8
Questions & Answers PDF Page 9

Question: 5

Create a pod named kucc8 with a single app container for each of the
following images running inside (there may be between 1 and 4 images specified):
nginx + redis + memcached.

Answer: See the


solution below.

Explanation:
solution
Questions & Answers PDF Page 10
Questions & Answers PDF Page 11

You might also like