Summer Sale- Special Discount Limited Time 65% Offer - Ends in 0d 00h 00m 00s - Coupon code: netdisc

Linux Foundation CKA Certified Kubernetes Administrator (CKA) Program Exam Practice Test

Page: 1 / 8
Total 83 questions

Certified Kubernetes Administrator (CKA) Program Questions and Answers

Question 1

Create a file:

/opt/KUCC00302/kucc00302.txt that lists all pods that implement service baz in namespace development.

The format of the file should be one pod name per line.

Options:

Question 2

Task Weight: 4%

Question # 2

Task

Scale the deployment webserver to 3 pods.

Options:

Question 3

Score: 7%

Question # 3

Task

Reconfigure the existing deployment front-end and add a port specification named http exposing port 80/tcp of the existing container nginx.

Create a new service named front-end-svc exposing the container port http.

Configure the new service to also expose the individual Pods via a NodePort on the nodes on which they are scheduled.

Options:

Question 4

List the nginx pod with custom columns POD_NAME and POD_STATUS

Options:

Question 5

Create a Kubernetes secret as follows:

    Name: super-secret

    password: bob

Create a pod named pod-secrets-via-file, using the redis Image, which mounts a secret named super-secret at /secrets.

Create a second pod named pod-secrets-via-env, using the redis Image, which exports password as CONFIDENTIAL

Options:

Question 6

You must connect to the correct host.

Failure to do so may result in a zero score.

[candidate@base] $ ssh Cka000022

Task

Reconfigure the existing Deployment front-end in namespace spline-reticulator to expose port 80/tcp of the existing container nginx .

Create a new Service named front-end-svc exposing the container port 80/tcp .

Configure the new Service to also expose the individual Pods via a NodePort .

Options:

Question 7

Check to see how many worker nodes are ready (not including nodes tainted NoSchedule) and write the number to /opt/KUCC00104/kucc00104.txt.

Options:

Question 8

Score:7%

Question # 8

Task

Create a new PersistentVolumeClaim

• Name: pv-volume

• Class: csi-hostpath-sc

• Capacity: 10Mi

Create a new Pod which mounts the PersistentVolumeClaim as a volume:

• Name: web-server

• Image: nginx

• Mount path: /usr/share/nginx/html

Configure the new Pod to have ReadWriteOnce access on the volume.

Finally, using kubectl edit or kubectl patch expand the PersistentVolumeClaim to a capacity of 70Mi and record that change.

Options:

Question 9

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.

Options:

Question 10

Score: 4%

Question # 10

Task

Set the node named ek8s-node-1 as unavailable and reschedule all the pods running on it.

Options:

Question 11

Create an nginx pod and list the pod with different levels of verbosity

Options:

Question 12

Create a pod that echo “hello world” and then exists. Have the pod deleted automatically when it’s completed

Options:

Question 13

Score: 13%

Question # 13

Task

A Kubernetes worker node, named wk8s-node-0 is in state NotReady. Investigate why this is the case, and perform any appropriate steps to bring the node to a Ready state, ensuring that any changes are made permanent.

Question # 13

Options:

Question 14

List pod logs named “frontend” and search for the pattern “started” and write it to a file “/opt/error-logs”

Options:

Question 15

Create and configure the service front-end-service so it's accessible through NodePort and routes to the existing pod named front-end.

Options:

Question 16

Score: 4%

Question # 16

Task

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 .

Options:

Question 17

Score: 7%

Question # 17

Task

Create a new NetworkPolicy named allow-port-from-namespace in the existing namespace echo. Ensure that the new NetworkPolicy allows Pods in namespace my-app to connect to port 9000 of Pods in namespace echo.

Further ensure that the new NetworkPolicy:

• does not allow access to Pods, which don't listen on port 9000

• does not allow access from Pods, which are not in namespace my-app

Options:

Question 18

Score: 4%

Question # 18

Task

Check to see how many nodes are ready schedulable (not including nodes tainted NoSchedule ) and write the number to /opt/KUSC00402/kusc00402.txt.

Options:

Question 19

List all the pods sorted by name

Options:

Question 20

Score: 4%

Question # 20

Context

You have been asked to create a new ClusterRole for a deployment pipeline and bind it to a specific ServiceAccount scoped to a specific namespace.

Task

Create a new ClusterRole named deployment-clusterrole, which only allows to create the following resource types:

• Deployment

• StatefulSet

• DaemonSet

Create a new ServiceAccount named cicd-token in the existing namespace app-team1.

Bind the new ClusterRole deployment-clusterrole lo the new ServiceAccount cicd-token , limited to the namespace app-team1.

Options:

Question 21

Score: 4%

Question # 21

Task

Create a persistent volume with name app-data , of capacity 1Gi and access mode ReadOnlyMany. The type of volume is hostPath and its location is /srv/app-data .

Options:

Question 22

Create a nginx pod with label env=test in engineering namespace

Options:

Question 23

Question # 23

Task

Create a new Ingress resource as follows:

. Name: echo

. Namespace : sound-repeater

. Exposing Service echoserver-service on

http://example.org/echo using Service port 8080

The availability of Service

echoserver-service can be checked

i

using the following command, which should return 200 :

[candidate@cka000024] $ curl -o /de v/null -s -w "%{http_code}\n" http://example.org/echo

Options:

Question 24

Score: 5%

Question # 24

Task

From the pod label name=cpu-utilizer, find pods running high CPU workloads and write the name of the pod consuming most CPU to the file /opt/KUTR00401/KUTR00401.txt (which already exists).

Options:

Page: 1 / 8
Total 83 questions