Linux Foundation Certified Kubernetes Application Developer CKAD Exam Questions in PDF

Free Linux Foundation CKAD Dumps Questions (page: 2)

Refer to Exhibit.



Set Configuration Context:
[student@node-1] $ | kubectl
Config use-context k8s
Context
A pod is running on the cluster but it is not responding.

Task:
The desired behavior is to have Kubemetes restart the pod when an endpoint returns an HTTP 500 on the /healthz endpoint. The service, probe-pod, should never send traffic to the pod while it is failing.
Please complete the following:
-The application has an endpoint, /started, that will indicate if it can accept traffic by returning an HTTP 200. If the endpoint returns an HTTP 500, the application has not yet finished initialization.
-The application has another endpoint /healthz that will indicate if the application is still working as expected by returning an HTTP 200. If the endpoint returns an HTTP 500 the application is no longer responsive.
-Configure the probe-pod pod provided to use these endpoints
-The probes should use port 8080

  1. See Explanation section for answer.

Answer(s): A

Explanation:

Solution:
To have Kubernetes automatically restart a pod when an endpoint returns an HTTP 500 on the /healthz endpoint, you will need to configure liveness and readiness probes on the pod. First, you will need to create a livenessProbe and a readinessProbe in the pod's definition yaml file. The livenessProbe will check the /healthz endpoint, and if it returns an HTTP 500, the pod will be restarted. The readinessProbe will check the /started endpoint, and if it returns an HTTP 500, the pod will not receive traffic.
Here's an example of how you can configure the liveness and readiness probes in the pod definition yaml file:
apiVersion: v1
kind: Pod metadata:
name: probe-pod spec:
containers:
- name: probe-pod image: <image-name>
ports:
- containerPort: 8080
livenessProbe:
httpGet:
path: /healthz port: 8080
initialDelaySeconds: 15
periodSeconds: 10
failureThreshold: 3
readinessProbe:
httpGet:
path: /started port: 8080
initialDelaySeconds: 15
periodSeconds: 10
failureThreshold: 3
The httpGet specifies the endpoint to check and the port to use. The initialDelaySeconds is the amount of time the pod will wait before starting the probe. periodSeconds is the amount of time between each probe check, and the failureThreshold is the number of failed probes before the pod is considered unresponsive.
You can use kubectl to create the pod by running the following command:
kubectl apply -f <filename>.yaml
Once the pod is created, Kubernetes will start monitoring it using the configured liveness and readiness probes. If the /healthz endpoint returns an HTTP 500, the pod will be restarted. If the /started endpoint returns an HTTP 500, the pod will not receive traffic. Please note that if the failure threshold is set to 3, it means that if the probe fails 3 times consecutively it will be considered as a failure.
The above configuration assumes that the application is running on port 8080 and the endpoints are available on the same port.



Refer to Exhibit.



Set Configuration Context:
[student@node-1] $ | kubectl
Config use-context k8s
Context
You sometimes need to observe a pod's logs, and write those logs to a file for further analysis.

Task:
Please complete the following;
-Deploy the counter pod to the cluster using the provided YAMLspec file at /opt/KDOB00201/counter.yaml
-Retrieve all currently available application logs from the running pod and store them in the file /opt/KDOB0020l/log_Output.txt, which has already been created

  1. See Explanation section for answer.

Answer(s): A

Explanation:

Solution:
To deploy the counter pod to the cluster using the provided YAML spec file, you can use the kubectl apply command. The apply command creates and updates resources in a cluster.
kubectl apply -f /opt/KDOB00201/counter.yaml
This command will create the pod in the cluster. You can use the kubectl get pods command to check the status of the pod and ensure that it is running.
kubectl get pods
To retrieve all currently available application logs from the running pod and store them in the file /opt/KDOB0020l/log_Output.txt, you can use the kubectl logs command. The logs command retrieves logs from a container in a pod.
kubectl logs -f <pod-name> > /opt/KDOB0020l/log_Output.txt Replace <pod-name> with the name of the pod.
You can also use -f option to stream the logs.
kubectl logs -f <pod-name> > /opt/KDOB0020l/log_Output.txt & This command will retrieve the logs from the pod and write them to the /opt/KDOB0020l/log_Output.txt file.
Please note that the above command will retrieve all logs from the pod, including previous logs. If you want to retrieve only the new logs that are generated after running the command, you can add the --since flag to the kubectl logs command and specify a duration, for example --since=24h for logs generated in the last 24 hours.
Also, please note that, if the pod has multiple containers, you need to specify the container name using -c option.
kubectl logs -f <pod-name> -c <container-name> > /opt/KDOB0020l/log_Output.txt The above command will redirect the logs of the specified container to the file.







Refer to Exhibit.



Context
It is always useful to look at the resources your applications are consuming in a cluster.
Task:
-From the pods running in namespace cpu-stress , write the name only of the pod that is consuming the most CPU to file /opt/KDOBG030l/pod.txt, which has already been created.

  1. See Explanation section for answer.

Answer(s): A

Explanation:

Solution:



Context
Anytime a team needs to run a container on Kubernetes they will need to define a pod within which to run the container.
Task:
Please complete the following:
-Create a YAML formatted pod manifest
/opt/KDPD00101/podl.yml to create a pod named app1 that runs a container named app1cont using image Ifccncf/arg-output with these command line arguments: -lines 56 -F
-Create the pod with the kubect1 command using the YAML file created in the previous step
-When the pod is running display summary data about the pod in JSON format using the kubect1 command and redirect the output to a file named /opt/KDPD00101/out1.json

-All of the files you need to work with have been created, empty, for your convenience

  1. See Explanation section for answer.

Answer(s): A

Explanation:

Solution:













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

  1. See Explanation section for answer.

Answer(s): A

Explanation:

Solution:









Share your comments for Linux Foundation CKAD exam with other users:

C
CW
7/11/2023 3:19:00 PM

thank you for providing such assistance.

M
Mn8300
11/9/2023 8:53:00 AM

nice questions

N
Nico
4/23/2023 11:41:00 PM

my 3rd purcahse from this site. these exam dumps are helpful. very helpful.

C
Chere
9/15/2023 4:21:00 AM

found it good

T
Thembelani
5/30/2023 2:47:00 AM

excellent material

V
vinesh phale
9/11/2023 2:51:00 AM

very helpfull

B
Bhagiii
11/4/2023 7:04:00 AM

well explained.

R
Rahul
8/8/2023 9:40:00 PM

i need the pdf, please.

C
CW
7/11/2023 2:51:00 PM

a good source for exam preparation

A
Anchal
10/23/2023 4:01:00 PM

nice questions

J
J Nunes
9/29/2023 8:19:00 AM

i need ielts general training audio guide questions

A
Ananya
9/14/2023 5:16:00 AM

please make this content available

S
Swathi
6/4/2023 2:18:00 PM

content is good

L
Leo
7/29/2023 8:45:00 AM

latest dumps please

L
Laolu
2/15/2023 11:04:00 PM

aside from pdf the test engine software is helpful. the interface is user-friendly and intuitive, making it easy to navigate and find the questions.

Z
Zaynik
9/17/2023 5:36:00 AM

questions and options are correct, but the answers are wrong sometimes. so please check twice or refer some other platform for the right answer

M
Massam
6/11/2022 5:55:00 PM

90% of questions was there but i failed the exam, i marked the answers as per the guide but looks like they are not accurate , if not i would have passed the exam given that i saw about 45 of 50 questions from dump

A
Anonymous
12/27/2023 12:47:00 AM

answer to this question "what administrative safeguards should be implemented to protect the collected data while in use by manasa and her product management team? " it should be (c) for the following reasons: this administrative safeguard involves controlling access to collected data by ensuring that only individuals who need the data for their job responsibilities have access to it. this helps minimize the risk of unauthorized access and potential misuse of sensitive information. while other options such as (a) documenting data flows and (b) conducting a privacy impact assessment (pia) are important steps in data protection, implementing a "need to know" access policy directly addresses the issue of protecting data while in use by limiting access to those who require it for legitimate purposes. (d) is not directly related to safeguarding data during use; it focuses on data transfers and location.

J
Japles
5/23/2023 9:46:00 PM

password lockout being the correct answer for question 37 does not make sense. it should be geofencing.

F
Faritha
8/10/2023 6:00:00 PM

for question 4, the righr answer is :recover automatically from failures

A
Anonymous
9/14/2023 4:27:00 AM

question number 4s answer is 3, option c. i

P
p das
12/7/2023 11:41:00 PM

very good questions

A
Anna
1/5/2024 1:12:00 AM

i am confused about the answers to the questions. are the answers correct?

B
Bhavya
9/13/2023 10:15:00 AM

very usefull

R
Rahul Kumar
8/31/2023 12:30:00 PM

need certification.

D
Diran Ole
9/17/2023 5:15:00 PM

great exam prep

V
Venkata Subbarao Bandaru
6/24/2023 8:45:00 AM

i require dump

D
D
7/15/2023 1:38:00 AM

good morning, could you please upload this exam again,

A
Ann
9/15/2023 5:39:00 PM

hi can you please upload the dumps for sap contingent module. thanks

S
Sridhar
1/16/2024 9:19:00 PM

good questions

S
Summer
10/4/2023 9:57:00 PM

looking forward to the real exam

V
vv
12/2/2023 2:45:00 PM

good ones for exam preparation

D
Danny Zas
9/15/2023 4:45:00 AM

this is a good experience

S
SM 1211
10/12/2023 10:06:00 PM

hi everyone

AI Tutor 👋 I’m here to help!