Free Linux Foundation CKAD Exam Actual Questions

The questions for CKAD were last updated On Nov 16, 2024

Question No. 1

Refer to Exhibit.

Context

You are tasked to create a secret and consume the secret in a pod using environment variables as follow:

Task

* Create a secret named another-secret with a key/value pair; key1/value4

* Start an nginx pod named nginx-secret using container image nginx, and add an environment variable exposing the value of the secret key key 1, using COOL_VARIABLE as the name for the environment variable inside the pod

Show Answer Hide Answer
Correct Answer: A

Question No. 2

Refer to Exhibit.

Context

Developers occasionally need to submit pods that run periodically.

Task

Follow the steps below to create a pod that will start at a predetermined time and]which runs to completion only once each time it is started:

* Create a YAML formatted Kubernetes manifest /opt/KDPD00301/periodic.yaml that runs the following shell command: date in a single busybox container. The command should run every minute and must complete within 22 seconds or be terminated oy Kubernetes. The Cronjob namp and container name should both be hello

* Create the resource in the above manifest and verify that the job executes successfully at least once

Show Answer Hide Answer
Correct Answer: A

Question No. 3

Refer to Exhibit.

Task

A Deployment named backend-deployment in namespace staging runs a web application on port 8081.

Show Answer Hide Answer
Correct Answer: A

Question No. 4

Refer to Exhibit.

Set Configuration Context:

[student@node-1] $ | kubectl

Config use-context k8s

Context

A web application requires a specific version of redis to be used as a cache.

Task

Create a pod with the following characteristics, and leave it running when complete:

* The pod must run in the web namespace.

The namespace has already been created

* The name of the pod should be cache

* Use the Ifccncf/redis image with the 3.2 tag

* Expose port 6379

Show Answer Hide Answer
Correct Answer: A

Question No. 5

Refer to Exhibit.

Task

Create a new deployment for running.nginx with the following parameters;

* Run the deployment in the kdpd00201 namespace. The namespace has already been created

* Name the deployment frontend and configure with 4 replicas

* Configure the pod with a container image of lfccncf/nginx:1.13.7

* Set an environment variable of NGINX__PORT=8080 and also expose that port for the container above

Show Answer Hide Answer
Correct Answer: A