0% found this document useful (0 votes)
34 views24 pages

Cka 4

Certshared is offering guaranteed success with their CKA exam dumps, which include 67 questions and answers. The document contains various questions related to Kubernetes administration tasks, including creating pods, managing persistent volumes, and upgrading cluster components. Each question is accompanied by an answer and an explanation, ensuring users are well-prepared for the Certified Kubernetes Administrator exam.

Uploaded by

manmohanmirkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views24 pages

Cka 4

Certshared is offering guaranteed success with their CKA exam dumps, which include 67 questions and answers. The document contains various questions related to Kubernetes administration tasks, including creating pods, managing persistent volumes, and upgrading cluster components. Each question is accompanied by an answer and an explanation, ensuring users are well-prepared for the Certified Kubernetes Administrator exam.

Uploaded by

manmohanmirkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Certshared now are offering 100% pass ensure CKA dumps!

https://www.certshared.com/exam/CKA/ (67 Q&As)

Linux-Foundation
Exam Questions CKA
Certified Kubernetes Administrator (CKA) Program

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

NEW QUESTION 1
CORRECT TEXT
List all the pods sorted by name

A. Mastered
B. Not Mastered

Answer: A

Explanation:
kubect1 get pods --sort-by=.metadata.name

NEW QUESTION 2
CORRECT TEXT
Score:7%

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.

A. Mastered
B. Not Mastered

Answer: A

Explanation:
Solution:
vi pvc.yaml
storageclass pvc
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pv-volume
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 10Mi
storageClassName: csi-hostpath-sc
# vi pod-pvc.yaml
apiVersion: v1
kind: Pod
metadata:
name: web-server
spec:
containers:
- name: web-server
image: nginx
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: my-volume
volumes:

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

- name: my-volume
persistentVolumeClaim:
claimName: pv-volume
# craete
kubectl create -f pod-pvc.yaml
#edit
kubectl edit pvc pv-volume --record

NEW QUESTION 3
CORRECT TEXT
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

A. Mastered
B. Not Mastered

Answer: A

Explanation:
solution

F:\Work\Data Entry Work\Data Entry\20200827\CKA\12 B.JPG

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

F:\Work\Data Entry Work\Data Entry\20200827\CKA\12 C.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\12 D.JPG

NEW QUESTION 4
CORRECT TEXT
Get IP address of the pod – “nginx-dev”

A. Mastered
B. Not Mastered

Answer: A

Explanation:
Kubect1 get po -o wide
Using JsonPath
kubect1 get pods -o=jsonpath='{range
items[*]}{.metadata.name}{"\t"}{.status.podIP}{"\n"}{end}'

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

NEW QUESTION 5
CORRECT TEXT
Score: 7%

Task
Given an existing Kubernetes cluster running version 1.20.0, upgrade all of the Kubernetes control plane and node components on the master node only to version
1.20.1.
Be sure to drain the master node before upgrading it and uncordon it after the upgrade.

You are also expected to upgrade kubelet and kubectl on the master node.

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

A. Mastered
B. Not Mastered

Answer: A

Explanation:
SOLUTION:
[student@node-1] > ssh ek8s
kubectl cordon k8s-master
kubectl drain k8s-master --delete-local-data --ignore-daemonsets --force
apt-get install kubeadm=1.20.1-00 kubelet=1.20.1-00 kubectl=1.20.1-00 --
disableexcludes=kubernetes
kubeadm upgrade apply 1.20.1 --etcd-upgrade=false
systemctl daemon-reload
systemctl restart kubelet kubectl
uncordon k8s-master

NEW QUESTION 6
CORRECT TEXT
Create a deployment as follows:
? Name: nginx-random
? Exposed via a service nginx-random
? Ensure that the service & pod are accessible via their respective DNS records
? The container(s) within any pod(s) running as a part of this deployment should use the nginx Image
Next, use the utility nslookup to look up the DNS records of the service & pod and write the output to /opt/KUNW00601/service.dns and /opt/KUNW00601/pod.dns
respectively.

A. Mastered
B. Not Mastered

Answer: A

Explanation:
Solution:

F:\Work\Data Entry Work\Data Entry\20200827\CKA\17 C.JPG

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

F:\Work\Data Entry Work\Data Entry\20200827\CKA\17 D.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\17 E.JPG

NEW QUESTION 7
CORRECT TEXT
Create a deployment spec file that will:
? Launch 7 replicas of the nginx Image with the labelapp_runtime_stage=dev
? deployment name: kual00201
Save a copy of this spec file to /opt/KUAL00201/spec_deployment.yaml
(or /opt/KUAL00201/spec_deployment.json).
When you are done, clean up (delete) any new Kubernetes API object that you produced during this task.

A. Mastered
B. Not Mastered

Answer: A

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

Explanation:
solution

F:\Work\Data Entry Work\Data Entry\20200827\CKA\10 B.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\10 C.JPG

NEW QUESTION 8
CORRECT TEXT
Monitor the logs of pod foo and:
? Extract log lines corresponding to error
unable-to-access-website
? Write them to/opt/KULM00201/foo

A. Mastered
B. Not Mastered

Answer: A

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

Explanation:
solution

F:\Work\Data Entry Work\Data Entry\20200827\CKA\1 B.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\1 C.JPG

NEW QUESTION 9
CORRECT TEXT
Score: 7%

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

Task
First, create a snapshot of the existing etcd instance running at https://127.0.0.1:2379, saving the snapshot to /srv/data/etcd-snapshot.db.

Next, restore an existing, previous snapshot located at /var/lib/backup/etcd-snapshot-previo us.db

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

A. Mastered
B. Not Mastered

Answer: A

Explanation:
Solution:
#backup
ETCDCTL_API=3 etcdctl --endpoints="https://127.0.0.1:2379" --
cacert=/opt/KUIN000601/ca.crt --cert=/opt/KUIN000601/etcd-client.crt -- key=/opt/KUIN000601/etcd-client.key snapshot save /etc/data/etcd-snapshot.db
#restore
ETCDCTL_API=3 etcdctl --endpoints="https://127.0.0.1:2379" --
cacert=/opt/KUIN000601/ca.crt --cert=/opt/KUIN000601/etcd-client.crt -- key=/opt/KUIN000601/etcd-client.key snapshot restore /var/lib/backup/etcd-snapshot-
previoys.db

NEW QUESTION 10
CORRECT TEXT
Score: 7%

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.

A. Mastered
B. Not Mastered

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

Answer: A

Explanation:
Solution:
kubectl get deploy front-end
kubectl edit deploy front-end -o yaml
#port specification named http
#service.yaml
apiVersion: v1
kind: Service
metadata:
name: front-end-svc
labels:
app: nginx
spec:
ports:
- port: 80
protocol: tcp
name: http
selector:
app: nginx
type: NodePort
# kubectl create -f service.yaml
# kubectl get svc
# port specification named http
kubectl expose deployment front-end --name=front-end-svc --port=80 --tarport=80 -- type=NodePort

NEW QUESTION 10
CORRECT TEXT
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.

A. Mastered
B. Not Mastered

Answer: A

Explanation:
solution

F:\Work\Data Entry Work\Data Entry\20200827\CKA\11 B.JPG

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

F:\Work\Data Entry Work\Data Entry\20200827\CKA\11 C.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\11 D.JPG

NEW QUESTION 12
CORRECT TEXT
Given a partially-functioning Kubernetes cluster, identify symptoms of failure on the cluster.
Determine the node, the failing service, and take actions to bring up the failed service and restore the health of the cluster. Ensure that any changes are made
permanently.
You can ssh to the relevant I nodes (bk8s-master-0 or bk8s-node-0) using:
[student@node-1] $ ssh <nodename>
You can assume elevated privileges on any node in the cluster with the following command:
[student@nodename] $ | sudo –i

A. Mastered
B. Not Mastered

Answer: A

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

Explanation:
solution

F:\Work\Data Entry Work\Data Entry\20200827\CKA\23 C.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\23 D.JPG

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

F:\Work\Data Entry Work\Data Entry\20200827\CKA\23 E.JPG

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

A. Mastered
B. Not Mastered

Answer: A

Explanation:
kubectl run busybox --image=busybox -it --rm --restart=Never --
/bin/sh -c 'echo hello world'
kubectl get po # You shouldn't see pod with the name "busybox"

NEW QUESTION 18
CORRECT TEXT
Ensure a single instance of pod nginx is running on each node of the Kubernetes cluster where nginx also represents the Image name which has to be used. Do
not override any taints currently in place.
Use DaemonSet to complete this task and use ds-kusc00201 as DaemonSet name.

A. Mastered
B. Not Mastered

Answer: A

Explanation:
solution

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

F:\Work\Data Entry Work\Data Entry\20200827\CKA\3 B.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\3 C.JPG

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

F:\Work\Data Entry Work\Data Entry\20200827\CKA\3 D.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\3 E.JPG

NEW QUESTION 21
CORRECT TEXT
Create a pod as follows:
? Name: non-persistent-redis
? container Image: redis
? Volume with name: cache-control
? Mount path: /data/redis
The pod should launch in the staging namespace and the volume must not be persistent.

A. Mastered
B. Not Mastered

Answer: A

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

Explanation:
solution

F:\Work\Data Entry Work\Data Entry\20200827\CKA\13 B.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\13 C.JPG

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

F:\Work\Data Entry Work\Data Entry\20200827\CKA\13 D.JPG

NEW QUESTION 24
CORRECT TEXT
Score: 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.

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

A. Mastered
B. Not Mastered

Answer: A

Explanation:

Solution:
sudo -i
systemctl status kubelet
systemctl start kubelet
systemctl enable kubelet

NEW QUESTION 29
CORRECT TEXT
List the nginx pod with custom columns POD_NAME and POD_STATUS

A. Mastered
B. Not Mastered

Answer: A

Explanation:
kubectl get po -o=custom-columns="POD_NAME:.metadata.name, POD_STATUS:.status.containerStatuses[].state"

NEW QUESTION 34
CORRECT TEXT
Configure the kubelet systemd- managed service, on the node labelled with name=wk8s- node-1, to launch a pod containing a single container of Image httpd
named webtool automatically. Any spec files required should be placed in the /etc/kubernetes/manifests directory on the node.
You can ssh to the appropriate node using:
[student@node-1] $ ssh wk8s-node-1
You can assume elevated privileges on the node with the following command:
[student@wk8s-node-1] $ | sudo –i

A. Mastered
B. Not Mastered

Answer: A

Explanation:
solution

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

F:\Work\Data Entry Work\Data Entry\20200827\CKA\15 B.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\15 C.JPG

NEW QUESTION 38
CORRECT TEXT
List all the pods sorted by name

A. Mastered
B. Not Mastered

Answer: A

Explanation:
kubectl get pods --sort-by=.metadata.name

NEW QUESTION 42

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

CORRECT TEXT
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.

A. Mastered
B. Not Mastered

Answer: A

Explanation:
solution

F:\Work\Data Entry Work\Data Entry\20200827\CKA\2 C.JPG

NEW QUESTION 46
CORRECT TEXT
List the nginx pod with custom columns POD_NAME and POD_STATUS

A. Mastered
B. Not Mastered

Answer: A

Explanation:
kubectl get po -o=custom-columns="POD_NAME:.metadata.name, POD_STATUS:.status.containerStatuses[].state"

NEW QUESTION 50
CORRECT TEXT
Create a busybox pod that runs the command “env” and save the output to “envpod” file

A. Mastered
B. Not Mastered

Answer: A

Explanation:
kubectl run busybox --image=busybox --restart=Never –-rm -it -- env > envpod.yaml

NEW QUESTION 54
CORRECT TEXT
Create a nginx pod with label env=test in engineering namespace

A. Mastered
B. Not Mastered

Answer: A

Explanation:

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

kubectl run nginx --image=nginx --restart=Never --labels=env=test


-- namespace=engineering --dry-run -o yaml > nginx-pod.yaml
kubectl run nginx --image=nginx --restart=Never --labels=env=test --
namespace=engineering --dry-run -o yaml | kubectl create -n engineering -f –
YAML File:
apiVersion: v1
kind: Pod
metadata:
name: nginx
namespace: engineering
labels:
env: test
spec:
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
restartPolicy: Never
kubectl create -f nginx-pod.yaml

NEW QUESTION 57
CORRECT TEXT
List “nginx-dev” and “nginx-prod” pod and delete those pods

A. Mastered
B. Not Mastered

Answer: A

Explanation:
kubect1 get pods -o wide
kubectl delete po “nginx-dev”kubectl delete po “nginx-prod”

NEW QUESTION 58
CORRECT TEXT
Score: 4%

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

A. Mastered
B. Not Mastered

Answer: A

Explanation:
SOLUTION:
[student@node-1] > ssh ek8s
kubectl cordon ek8s-node-1
kubectl drain ek8s-node-1 --delete-local-data --ignore-daemonsets --force

NEW QUESTION 61
......

Guaranteed success with Our exam guides visit - https://www.certshared.com


Certshared now are offering 100% pass ensure CKA dumps!
https://www.certshared.com/exam/CKA/ (67 Q&As)

Thank You for Trying Our Product

We offer two products:

1st - We have Practice Tests Software with Actual Exam Questions

2nd - Questons and Answers in PDF Format

CKA Practice Exam Features:

* CKA Questions and Answers Updated Frequently

* CKA Practice Questions Verified by Expert Senior Certified Staff

* CKA Most Realistic Questions that Guarantee you a Pass on Your FirstTry

* CKA Practice Test Questions in Multiple Choice Formats and Updatesfor 1 Year

100% Actual & Verified — Instant Download, Please Click


Order The CKA Practice Test Here

Guaranteed success with Our exam guides visit - https://www.certshared.com


Powered by TCPDF (www.tcpdf.org)

You might also like