[2024] CKAD Exam Dumps, Test Engine Practice Test Questions [Q16-Q33]

Share

[2024] CKAD Exam Dumps, Test Engine Practice Test Questions

Pass CKAD exam [Feb 19, 2024] Updated 33 Questions


Linux Foundation CKAD Certification Exam is a challenging and rewarding certification that can help developers validate their Kubernetes skills and advance their careers. CKAD exam covers a wide range of topics and requires candidates to demonstrate their ability to solve complex problems. Preparing for the exam requires dedication and hard work, but the certification can open up new job opportunities and increase earning potential.

 

NEW QUESTION # 16
Refer to Exhibit.

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

Answer:

Explanation:
Solution:



NEW QUESTION # 17
Exhibit:

Context
A project that you are working on has a requirement for persistent data to be available.
Task
To 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

  • A. Solution:









  • B. Solution:








Answer: A


NEW QUESTION # 18

Task
You have rolled out a new pod to your infrastructure and now you need to allow it to communicate with the web and storage pods but nothing else. Given the running pod kdsn00201 -newpod edit it to use a network policy that will allow it to send and receive traffic only to and from the web and storage pods.

Answer:

Explanation:
See the solution below.
Explanation
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: internal-policy
namespace: default
spec:
podSelector:
matchLabels:
name: internal
policyTypes:
- Egress
- Ingress
ingress:
- {}
egress:
- to:
- podSelector:
matchLabels:
name: mysql
ports:
- protocol: TCP
port: 3306
- to:
- podSelector:
matchLabels:
name: payroll
ports:
- protocol: TCP
port: 8080
- ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP


NEW QUESTION # 19
Exhibit:

Context
Your application's namespace requires a specific service account to be used.
Task
Update the app-a deployment in the production namespace to run as the restrictedservice service account. The service account has already been created.

  • A. Solution:
  • B. Solution:

Answer: A


NEW QUESTION # 20

Task:
1- Update the Propertunel scaling configuration of the Deployment web1 in the ckad00015 namespace setting maxSurge to 2 and maxUnavailable to 59
2- 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

Answer:

Explanation:
See the solution below.
Explanation
Solution:

Text Description automatically generated


NEW QUESTION # 21

Context
You are tasked to create a ConfigMap and consume the ConfigMap in a pod using a volume mount.
Task
Please complete the following:
* Create a ConfigMap named another-config containing the key/value pair: key4/value3
* start a pod named nginx-configmap containing a single container using the nginx image, and mount the key you just created into the pod under directory /also/a/path See the solution below.

Answer:

Explanation:
Explanation
Solution:






NEW QUESTION # 22
Exhibit:

Given 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 primary
lfccncf/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-dev
container to run the command

which 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

  • A. Solution:





  • B. Solution:




Answer: A


NEW QUESTION # 23
Refer to Exhibit.

Given 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 primary
lfccncf/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-dev
container to run the command

which 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

Answer:

Explanation:
Solution:






NEW QUESTION # 24
Context

Task:
1) First update the Deployment cka00017-deployment in the ckad00017 namespace:
To run 2 replicas of the pod
Add the following label on the pod:
Role userUI
2) Next, Create a NodePort Service named cherry in the ckad00017 nmespace exposing the ckad00017-deployment Deployment on TCP port 8888

Answer:

Explanation:
Solution:






NEW QUESTION # 25
Refer to Exhibit.

Task:
1) Fix any API depreciation issues in the manifest file -/credible-mite/www.yaml so that this application can be deployed on cluster K8s.

2) Deploy the application specified in the updated manifest file -/credible-mite/www.yaml in namespace cobra

Answer:

Explanation:
Solution:



NEW QUESTION # 26

Context
Your application's namespace requires a specific service account to be used.
Task
Update the app-a deployment in the production namespace to run as the restrictedservice service account. The service account has already been created.

Answer:

Explanation:
See the solution below.
Explanation
Solution:


NEW QUESTION # 27
Exhibit:

Context
A 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

  • A. Solution:
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: my-nginx
    spec:
    selector:
    matchLabels:
    run: my-nginx
    replicas: 2
    template:
    metadata:
    labels:
    run: my-nginx
    spec:
    containers:
    - name: my-nginx
    image: nginx
    ports:
    - containerPort: 90
    This makes it accessible from any node in your cluster. Check the nodes the Pod is running on:
    kubectl apply -f ./run-my-nginx.yaml
    kubectl get pods -l run=my-nginx -o wide
    NAME READY STATUS RESTARTS AGE IP NODE
    my-nginx-3800858182-jr4a2 1/1 Running 0 13s 10.244.3.4 kubernetes-minion-905m
    my-nginx-3800858182-kna2y 1/1 Running 0 13s 10.244.2.5 kubernetes-minion-ljyd
    Check your pods' IPs:
    kubectl get pods -l run=my-nginx -o yaml | grep podIP
    podIP: 10.244.3.4
    podIP: 10.244.2.5
  • B. Solution:
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: my-nginx
    spec:
    selector:
    matchLabels:
    run: my-nginx
    - name: my-nginx
    image: nginx
    ports:
    - containerPort: 90
    This makes it accessible from any node in your cluster. Check the nodes the Pod is running on:
    kubectl apply -f ./run-my-nginx.yaml
    kubectl get pods -l run=my-nginx -o wide
    NAME READY STATUS RESTARTS AGE IP NODE
    my-nginx-3800858182-jr4a2 1/1 Running 0 13s 10.244.3.4 kubernetes-minion-905m
    my-nginx-3800858182-kna2y 1/1 Running 0 13s 10.244.2.5 kubernetes-minion-ljyd
    Check your pods' IPs:
    kubectl get pods -l run=my-nginx -o yaml | grep podIP
    podIP: 10.244.3.4
    podIP: 10.244.2.5

Answer: A


NEW QUESTION # 28

Task:
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 Container
2) Limits the memory to half the maximum memory constraint set for the crayfah name space.

Answer:

Explanation:
See the solution below.
Explanation
Solution:




NEW QUESTION # 29
Refer to Exhibit.

Task
You are required to create a pod that requests a certain amount of CPU and memory, so it gets scheduled to-a node that has those resources available.
* Create a pod named nginx-resources in the pod-resources namespace that requests a minimum of 200m CPU and 1Gi memory for its container
* The pod should use the nginx image
* The pod-resources namespace has already been created

Answer:

Explanation:
Solution:





NEW QUESTION # 30
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

Answer:

Explanation:
Solution:




NEW QUESTION # 31
Refer to Exhibit.

Task:
1) Create a secret named app-secret in the default namespace containing the following single key-value pair:
Key3: value1
2) 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.

Answer:

Explanation:
Solution:



NEW QUESTION # 32
Refer to Exhibit.

Context
Your application's namespace requires a specific service account to be used.
Task
Update the app-a deployment in the production namespace to run as the restrictedservice service account. The service account has already been created.

Answer:

Explanation:
Solution:


NEW QUESTION # 33
......

Linux Foundation CKAD Real 2024 Braindumps Mock Exam Dumps: https://www.dumpstorrent.com/CKAD-exam-dumps-torrent.html

Linux Foundation CKAD Actual Questions and 100% Cover Real Exam Questions: https://drive.google.com/open?id=1v6N4IuIAPWL4DpqBAcwXdCuAmdhBAWGr