This page was exported from Latest Exam Prep [ http://certify.vceprep.com ] Export date:Sat Sep 21 11:43:47 2024 / +0000 GMT ___________________________________________________ Title: Free Aug-2023 UPDATED Linux Foundation CKAD Certification Exam Dumps is Online [Q14-Q36] --------------------------------------------------- Free Aug-2023 UPDATED Linux Foundation CKAD Certification Exam Dumps is Online Linux Foundation Exam 2023 CKAD Dumps Updated Questions What is Kubernetes? Kubernetes is an open-source cluster platform that simplifies IT restarts across large organizations. Aims to make deployment and management easier, especially as it relates to Linux containers, as well as provide a platform for modern application development. Minutes. Containers can also be thought of as a port of the OS to the OS, and that's one way you can look at them. Remember, Kubernetes is a container orchestration platform, so its main purpose is to manage containers and containers only. Kubernetes uses some of these primitives, or building blocks, to orchestrate all the containers that you have running across the cluster. Wrongly, they are called microservices. These microservices will run on many containers at the same time, but they'll run on one or several nodes. CNCF CKAD Dumps is perfect for you if you are working on Kubernetes in any capacity, be it in the development team, or in the support team. The pattern is very simple: one master node and a cluster of workers. You can think about Kubernetes as a huge collection of nodes that are running containers, and they all get updated at the same time. The cluster is distributed, and each node can have an individual network configuration. Software architects can use Kubernetes to quickly build and deploy an application, and the automation tools will take care of the rest. It's a self-service tool that makes it easier to build, manage, and scale applications. Lead a simple cluster in a few steps. It is easy to set up a cluster with a single master node, and then add more nodes in the future. Fast with its quick installation and deployment. Drilling down into the details, Kubernetes is much more than just a way to manage containers. It can also be used for orchestrating applications in general. If you are looking for an easy way to manage your applications, Kubernetes can help you do that very easily and confidently. Devices all over can be configured, and they can be set up to talk to each other. To prepare for the CKAD certification exam, an individual should have hands-on experience in Kubernetes application development. Additionally, the Linux Foundation offers a CKAD training course that provides individuals with the necessary knowledge and skills to pass the certification exam. There are also various online resources and practice exams available that can be used to prepare for the exam.   NEW QUESTION 14Exhibit:TaskA deployment is falling on the cluster due to an incorrect image being specified. Locate the deployment, and fix the problem.  Pending NEW QUESTION 15ContextA user has reported an aopticauon is unteachable due to a failing livenessProbe .TaskPerform the following tasks:* Find the broken pod and store its name and namespace to /opt/KDOB00401/broken.txt in the format:The output file has already been created* Store the associated error events to a file /opt/KDOB00401/error.txt, The output file has already been created. You will need to use the -o wide output specifier with your command* Fix the issue. See the solution below.ExplanationSolution:Create the Pod:kubectl create-f http://k8s.io/docs/tasks/configure-pod-container/exec-liveness.yamlWithin 30 seconds, view the Pod events:kubectl describe pod liveness-execThe output indicates that no liveness probes have failed yet:FirstSeen LastSeen Count From SubobjectPath Type Reason Message——— ——– —– —- ————- ——– —— ——-24s 24s 1 {default-scheduler } Normal Scheduled Successfully assigned liveness-exec to worker023s 23s 1 {kubelet worker0} spec.containers{liveness} Normal Pulling pulling image“gcr.io/google_containers/busybox”23s 23s 1 {kubelet worker0} spec.containers{liveness} Normal Pulled Successfully pulled image“gcr.io/google_containers/busybox”23s 23s 1 {kubelet worker0} spec.containers{liveness} Normal Created Created container with docker id86849c15382e; Security:[seccomp=unconfined]23s 23s 1 {kubelet worker0} spec.containers{liveness} Normal Started Started container with docker id86849c15382eAfter 35 seconds, view the Pod events again:kubectl describe pod liveness-execAt the bottom of the output, there are messages indicating that the liveness probes have failed, and the containers have been killed and recreated.FirstSeen LastSeen Count From SubobjectPath Type Reason Message——— ——– —– —- ————-37s 37s 1 {default-scheduler } Normal Scheduled Successfully assigned liveness-exec to worker036s 36s 1 {kubelet worker0} spec.containers{liveness} Normal Pulling pulling image“gcr.io/google_containers/busybox”36s 36s 1 {kubelet worker0} spec.containers{liveness} Normal Pulled Successfully pulled image“gcr.io/google_containers/busybox”36s 36s 1 {kubelet worker0} spec.containers{liveness} Normal Created Created container with docker id86849c15382e; Security:[seccomp=unconfined]36s 36s 1 {kubelet worker0} spec.containers{liveness} Normal Started Started container with docker id86849c15382e2s 2s 1 {kubelet worker0} spec.containers{liveness} Warning Unhealthy Liveness probe failed: cat: can’t open‘/tmp/healthy’: No such file or directoryWait another 30 seconds, and verify that the Container has been restarted:kubectl get pod liveness-execThe output shows that RESTARTS has been incremented:NAME READY STATUS RESTARTS AGEliveness-exec 1/1 Running 1 mNEW QUESTION 16ContextTask:Create a Pod named nginx resources in the existing pod resources namespace.Specify a single container using nginx:stable image.Specify a resource request of 300m cpus and 1G1 of memory for the Pod’s container. Solution:NEW QUESTION 17Task:A pod within the Deployment named buffale-deployment and in namespace gorilla is logging errors.1) Look at the logs identify errors messages.Find errors, including User “system:serviceaccount:gorilla:default” cannot list resource “deployment” […] in the namespace “gorilla”2) Update the Deployment buffalo-deployment to resolve the errors in the logs of the Pod.The buffalo-deployment ‘S manifest can be found at -/prompt/escargot/buffalo-deployment.yaml See the solution below. ExplanationSolution:Text Description automatically generatedText Description automatically generatedText Description automatically generatedText Description automatically generatedNEW QUESTION 18Task:Update the Pod ckad00018-newpod in the ckad00018 namespace to use a NetworkPolicy allowing the Pod to send and receive traffic only to and from the pods web and db See the solution below.ExplanationSolution:NEW QUESTION 19ContextIt 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. See the solution below.ExplanationSolution:NEW QUESTION 20ContextContextA pod is running on the cluster but it is not responding.TaskThe 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 Solution:apiVersion: v1kind: Podmetadata:labels:test: livenessname: liveness-execspec:containers:– name: livenessimage: k8s.gcr.io/busyboxargs:– /bin/sh– -c– touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600livenessProbe:exec:command:– cat– /tmp/healthyinitialDelaySeconds: 5periodSeconds: 5In the configuration file, you can see that the Pod has a single Container. The periodSeconds field specifies that the kubelet should perform a liveness probe every 5 seconds. The initialDelaySeconds field tells the kubelet that it should wait 5 seconds before performing the first probe. To perform a probe, the kubelet executes the command cat /tmp/healthy in the target container. If the command succeeds, it returns 0, and the kubelet considers the container to be alive and healthy. If the command returns a non-zero value, the kubelet kills the container and restarts it.When the container starts, it executes this command:/bin/sh -c “touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600” For the first 30 seconds of the container’s life, there is a /tmp/healthy file. So during the first 30 seconds, the command cat /tmp/healthy returns a success code. After 30 seconds, cat /tmp/healthy returns a failure code.Create the Pod:kubectl apply -f https://k8s.io/examples/pods/probe/exec-liveness.yamlWithin 30 seconds, view the Pod events:kubectl describe pod liveness-execThe output indicates that no liveness probes have failed yet:FirstSeen LastSeen Count From SubobjectPath Type Reason Message——— ——– —– —- ————- ——– —— ——-24s 24s 1 {default-scheduler } Normal Scheduled Successfully assigned liveness-exec to worker023s 23s 1 {kubelet worker0} spec.containers{liveness} Normal Pulling pulling image “k8s.gcr.io/busybox”23s 23s 1 {kubelet worker0} spec.containers{liveness} Normal Pulled Successfully pulled image “k8s.gcr.io/busybox”23s 23s 1 {kubelet worker0} spec.containers{liveness} Normal Created Created container with docker id 86849c15382e; Security:[seccomp=unconfined]23s 23s 1 {kubelet worker0} spec.containers{liveness} Normal Started Started container with docker id 86849c15382e After 35 seconds, view the Pod events again:kubectl describe pod liveness-execAt the bottom of the output, there are messages indicating that the liveness probes have failed, and the containers have been killed and recreated.FirstSeen LastSeen Count From SubobjectPath Type Reason Message——— ——– —– —- ————- ——– —— ——-37s 37s 1 {default-scheduler } Normal Scheduled Successfully assigned liveness-exec to worker036s 36s 1 {kubelet worker0} spec.containers{liveness} Normal Pulling pulling image “k8s.gcr.io/busybox”36s 36s 1 {kubelet worker0} spec.containers{liveness} Normal Pulled Successfully pulled image “k8s.gcr.io/busybox”36s 36s 1 {kubelet worker0} spec.containers{liveness} Normal Created Created container with docker id 86849c15382e; Security:[seccomp=unconfined]36s 36s 1 {kubelet worker0} spec.containers{liveness} Normal Started Started container with docker id 86849c15382e2s 2s 1 {kubelet worker0} spec.containers{liveness} Warning Unhealthy Liveness probe failed: cat: can’t open ‘/tmp/healthy’: No such file or directory Wait another 30 seconds, and verify that the container has been restarted:kubectl get pod liveness-execThe output shows that RESTARTS has been incremented:NAME READY STATUS RESTARTS AGEliveness-exec 1/1 Running 1 1mNEW QUESTION 21TaskA deployment is falling on the cluster due to an incorrect image being specified. Locate the deployment, and fix the problem. See the solution belowExplanationcreate deploy hello-deploy –image=nginx –dry-run=client -o yaml > hello-deploy.yaml Update deployment image to nginx:1.17.4: kubectl set image deploy/hello-deploy nginx=nginx:1.17.4NEW QUESTION 22ContextTask:Modify the existing Deployment named broker-deployment running in namespace quetzal so that its containers.1) Run with user ID 30000 and2) Privilege escalation is forbiddenThe broker-deployment is manifest file can be found at: Solution:NEW QUESTION 23ContextContextA project that you are working on has a requirement for persistent data to be available.TaskTo facilitate this, perform the following tasks:* Create a file on node sk8s-node-0 at /opt/KDSP00101/data/index.html with the content Acct=Finance* Create a PersistentVolume named task-pv-volume using hostPath and allocate 1Gi to it, specifying that the volume is at /opt/KDSP00101/data on the cluster’s node. The configuration should specify the access mode of ReadWriteOnce . It should define the StorageClass name exam for the PersistentVolume , which will be used to bind PersistentVolumeClaim requests to this PersistenetVolume.* Create a PefsissentVolumeClaim named task-pv-claim that requests a volume of at least 100Mi and specifies an access mode of ReadWriteOnce* Create a pod that uses the PersistentVolmeClaim as a volume with a label app: my-storage-app mounting the resulting volume to a mountPath /usr/share/nginx/html inside the pod Solution:NEW QUESTION 24Exhibit:ContextAs a Kubernetes application developer you will often find yourself needing to update a running application.TaskPlease complete the following:* Update the app deployment in the kdpd00202 namespace with a maxSurge of 5% and a maxUnavailable of 2%* Perform a rolling update of the web1 deployment, changing the Ifccncf/ngmx image version to 1.13* Roll back the app deployment to the previous version  Solution:  Solution: NEW QUESTION 25Refer to Exhibit.Set Configuration Context:[student@node-1] $ | kubectlConfig use-context k8sContextA pod is running on the cluster but it is not responding.TaskThe 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 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: v1kind: Podmetadata:name: probe-podspec:containers:– name: probe-podimage: <image-name>ports:– containerPort: 8080livenessProbe:httpGet:path: /healthzport: 8080initialDelaySeconds: 15periodSeconds: 10failureThreshold: 3readinessProbe:httpGet:path: /startedport: 8080initialDelaySeconds: 15periodSeconds: 10failureThreshold: 3The 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>.yamlOnce 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.NEW QUESTION 26ContextTask:The pod for the Deployment named nosql in the craytisn namespace fails to start because its container runs out of resources.Update the nosol Deployment so that the Pod:1) Request 160M of memory for its Container2) Limits the memory to half the maximum memory constraint set for the crayfah name space. Solution:NEW QUESTION 27Exhibit:ContextYou sometimes need to observe a pod’s logs, and write those logs to a file for further analysis.TaskPlease 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  Solution:  Solution: NEW QUESTION 28Refer to Exhibit.Task:1- Update the Propertunel scaling configuration of the Deployment web1 in the ckad00015 namespace setting maxSurge to 2 and maxUnavailable to 592- Update the web1 Deployment to use version tag 1.13.7 for the Ifconf/nginx container image.3- Perform a rollback of the web1 Deployment to its previous version Solution:NEW QUESTION 29Given a container that writes a log file in format A and a container that converts log files from format A to format B, create a deployment that runs both containers such that the log files from the first container are converted by the second container, emitting logs in format B.Task:* Create a deployment named deployment-xyz in the default namespace, that:*Includes a primarylfccncf/busybox:1 container, named logger-dev*includes a sidecar Ifccncf/fluentd:v0.12 container, named adapter-zen*Mounts a shared volume /tmp/log on both containers, which does not persist when the pod is deleted*Instructs the logger-devcontainer to run the commandwhich should output logs to /tmp/log/input.log in plain text format, with example values:* The adapter-zen sidecar container should read /tmp/log/input.log and output the data to /tmp/log/output.* in Fluentd JSON format. Note that no knowledge of Fluentd is required to complete this task: all you will need to achieve this is to create the ConfigMap from the spec file provided at /opt/KDMC00102/fluentd-configma p.yaml , and mount that ConfigMap to /fluentd/etc in the adapter-zen sidecar container See the solution below. ExplanationSolution:NEW QUESTION 30Exhibit:ContextA container within the poller pod is hard-coded to connect the nginxsvc service on port 90 . As this port changes to 5050 an additional container needs to be added to the poller pod which adapts the container to connect to this new port. This should be realized as an ambassador container within the pod.Task* Update the nginxsvc service to serve on port 5050.* Add an HAproxy container named haproxy bound to port 90 to the poller pod and deploy the enhanced pod. Use the image haproxy and inject the configuration located at /opt/KDMC00101/haproxy.cfg, with a ConfigMap named haproxy-config, mounted into the container so that haproxy.cfg is available at /usr/local/etc/haproxy/haproxy.cfg. Ensure that you update the args of the poller container to connect to localhost instead of nginxsvc so that the connection is correctly proxied to the new service endpoint. You must not modify the port of the endpoint in poller’s args . The spec file used to create the initial poller pod is available in /opt/KDMC00101/poller.yaml  Solution:apiVersion: apps/v1kind: Deploymentmetadata:name: my-nginxspec:selector:matchLabels:run: my-nginxreplicas: 2template:metadata:labels:run: my-nginxspec:containers:– name: my-nginximage: nginxports:– containerPort: 90This makes it accessible from any node in your cluster. Check the nodes the Pod is running on:kubectl apply -f ./run-my-nginx.yamlkubectl get pods -l run=my-nginx -o wideNAME READY STATUS RESTARTS AGE IP NODEmy-nginx-3800858182-jr4a2 1/1 Running 0 13s 10.244.3.4 kubernetes-minion-905mmy-nginx-3800858182-kna2y 1/1 Running 0 13s 10.244.2.5 kubernetes-minion-ljydCheck your pods’ IPs:kubectl get pods -l run=my-nginx -o yaml | grep podIPpodIP: 10.244.3.4podIP: 10.244.2.5  Solution:apiVersion: apps/v1kind: Deploymentmetadata:name: my-nginxspec:selector:matchLabels:run: my-nginx– name: my-nginximage: nginxports:– containerPort: 90This makes it accessible from any node in your cluster. Check the nodes the Pod is running on:kubectl apply -f ./run-my-nginx.yamlkubectl get pods -l run=my-nginx -o wideNAME READY STATUS RESTARTS AGE IP NODEmy-nginx-3800858182-jr4a2 1/1 Running 0 13s 10.244.3.4 kubernetes-minion-905mmy-nginx-3800858182-kna2y 1/1 Running 0 13s 10.244.2.5 kubernetes-minion-ljydCheck your pods’ IPs:kubectl get pods -l run=my-nginx -o yaml | grep podIPpodIP: 10.244.3.4podIP: 10.244.2.5 NEW QUESTION 31ContextTask:1- Update the Propertunel scaling configuration of the Deployment web1 in the ckad00015 namespace setting maxSurge to 2 and maxUnavailable to 592- Update the web1 Deployment to use version tag 1.13.7 for the Ifconf/nginx container image.3- Perform a rollback of the web1 Deployment to its previous version Solution:NEW QUESTION 32Exhibit:ContextIt 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.  Solution:  Solution: NEW QUESTION 33Task:1) Create a secret named app-secret in the default namespace containing the following single key-value pair:Key3: value12) Create a Pod named ngnix secret in the default namespace.Specify a single container using the nginx:stable image.Add an environment variable named BEST_VARIABLE consuming the value of the secret key3. See the solution below.ExplanationSolution:Text Description automatically generatedText Description automatically generatedNEW QUESTION 34Refer to Exhibit.TaskA deployment is falling on the cluster due to an incorrect image being specified. Locate the deployment, and fix the problem. create deploy hello-deploy –image=nginx –dry-run=client -o yaml > hello-deploy.yaml Update deployment image to nginx:1.17.4: kubectl set image deploy/hello-deploy nginx=nginx:1.17.4NEW QUESTION 35ContextContextDevelopers occasionally need to submit pods that run periodically.TaskFollow 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 Solution:NEW QUESTION 36Refer to Exhibit.ContextYou are asked to prepare a Canary deployment for testing a new application release.Task:A Service named krill-Service in the goshark namespace points to 5 pod created by the Deployment named current-krill-deployment1) Create an identical Deployment named canary-kill-deployment, in the same namespace.2) Modify the Deployment so that:-A maximum number of 10 pods run in the goshawk namespace.-40% of the krill-service ‘s traffic goes to the canary-krill-deployment pod(s) Solution: Loading … Linux Foundation Certified CKAD  Dumps Questions Valid CKAD Materials: https://www.vceprep.com/CKAD-latest-vce-prep.html --------------------------------------------------- Images: https://certify.vceprep.com/wp-content/plugins/watu/loading.gif https://certify.vceprep.com/wp-content/plugins/watu/loading.gif --------------------------------------------------- --------------------------------------------------- Post date: 2023-08-19 10:06:53 Post date GMT: 2023-08-19 10:06:53 Post modified date: 2023-08-19 10:06:53 Post modified date GMT: 2023-08-19 10:06:53