Best Preparations of CKA Exam 2022 Kubernetes Administrator Unlimited 63 Questions
Focus on CKA All-in-One Exam Guide For Quick Preparation.
How much CNCF CKA Certification Exam Cost and Details
- Length of Exam: 120 min
- No. of Questions: 17 Questions
- Types of questions: Multiple Choice Questions
- Retake Exam: Free
- Passing score: 66% or higher
NEW QUESTION 35
View certificate details in /etc/kubernetes/pki
Answer:
Explanation:
// Verify Public Key / Certificate file Openssl x509 -in certificate.crt -noout -text // Verify Private Key Openssl rsa -in "private-key" -check // Verify CSR Openssl req -text -noout -verify
NEW QUESTION 36
Print all pod name and all image name and write it to a file
name "/opt/pod-details.txt"
Answer:
Explanation:
kubectl get pods -o=custom-columns='Pod Name:metadata.name','Image:spec.containers[*].image' > /opt/pod-details.txt
NEW QUESTION 37
Create a nginx pod with label env=test in engineering namespace
See the solution below.
- A. 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 - B. 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
Answer: B
NEW QUESTION 38
Set the node namedek8s-node-1asunavailable and reschedule all thepods running on it.
Answer:
Explanation:
See the solution below.
Explanation
solution
NEW QUESTION 39
Get list of all the pods showing name and namespace with a jsonpath expression.
Answer:
Explanation:
See the solution below.
Explanation
kubectl get pods -o=jsonpath="{.items[*]['metadata.name'
, 'metadata.namespace']}"
NEW QUESTION 40
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
Answer:
Explanation:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\21 C.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\21 D.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\21 E.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\21 F.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\21 G.JPG
NEW QUESTION 41
List "nginx-dev" and "nginx-prod" pod and delete those pods
- A. kubect1 get pods -o wide
kubectl delete po "nginx-dev" kubectl delete po "nginx-prod" - B. kubect1 get pods -o wide
kubectl delete po "nginx-dev" kubectl delete po "nginx-prod"
Answer: B
NEW QUESTION 42
Create a configmap called cfgvolume with values var1=val1,
var2=val2 and create an nginx pod with volume nginx-volume which
reads data from this configmap cfgvolume and put it on the path
/etc/cfg
- A. // first create a configmap cfgvolume
kubectl create cm cfgvolume --from-literal=var1=val1 --fromliteral=var2=val2
// verify the configmap
kubectl describe cm cfgvolume
// create the config map
kubectl create -f nginx-volume.yml
vim nginx-configmap-pod.yaml
apiVersion: v1
kind: Pod
- name: nginx-volume
configMap:
name: cfgvolume
containers:
- image: nginx
name: nginx
volumeMounts:
- name: nginx-volume
mountPath: /etc/cfg
restartPolicy: Always
k kubectl apply -f nginx-configmap-pod.yaml
/ // Verify
// exec into the pod
kubectl exec -it nginx -- /bin/sh
// check the path
cd /etc/cfg - B. // first create a configmap cfgvolume
kubectl create cm cfgvolume --from-literal=var1=val1 --fromliteral=var2=val2
// verify the configmap
kubectl describe cm cfgvolume
// create the config map
kubectl create -f nginx-volume.yml
vim nginx-configmap-pod.yaml
apiVersion: v1
kind: Pod
metadata:
labels:
run: nginx
name: nginx
spec:
volumes:
- name: nginx-volume
configMap:
name: cfgvolume
containers:
- image: nginx
name: nginx
volumeMounts:
- name: nginx-volume
mountPath: /etc/cfg
restartPolicy: Always
k kubectl apply -f nginx-configmap-pod.yaml
/ // Verify
// exec into the pod
kubectl exec -it nginx -- /bin/sh
// check the path
cd /etc/cfg
Answer: B
NEW QUESTION 43
Create a deployment spec file thatwill:
* Launch 7 replicas of thenginxImage 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 thatyou produced during this task.
Answer:
Explanation:
See the solution below.
Explanation
solution

NEW QUESTION 44
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
Finally, using kubectl edit or kubectl patch PersistentVolumeClaim to a capacity of 70Mi and record that change.
Answer:
Explanation:
See the solution below.
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:
- name: my-volume
persistentVolumeClaim:
claimName: pv-volume
# craete
kubectl create -f pod-pvc.yaml
#edit
kubectl edit pvc pv-volume --record
NEW QUESTION 45
Delete the pod without any delay (force delete)
Answer:
Explanation:
Kubect1 delete po "POD-NAME" --grace-period=0 --force
NEW QUESTION 46
Create a pod that echo "hello world" and then exists. Have the pod deleted automatically when it's completed
Answer:
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 47
Label a node as app=test and verify
Answer:
Explanation:
kubectl label node node-name app=test // Verify kubectl get no -show-labels kubectl get no -l app=test
NEW QUESTION 48
Create a redis pod and mount "redis-config" as "redis.conf"
inside redis container, name the config volume as "redis-volume"
redis-config path - /opt/redis-config
- A. 0
- B. 1
- C. Pending
Answer: C
NEW QUESTION 49
Get the deployment rollout status
Answer:
Explanation:
kubectl rollout status deploy webapp
NEW QUESTION 50
List pod logs named "frontend" and search for the pattern "started" and write it to a file "/opt/error-logs"
Answer:
Explanation:
See the solution below.
Explanation
Kubectl logs frontend | grep -i "started" > /opt/error-logs
NEW QUESTION 51
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 be persistent.
Answer:
Explanation:
See the solution below.
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
F:\Work\Data Entry Work\Data Entry\20200827\CKA\13 D.JPG
NEW QUESTION 52
......
Guaranteed Success with CKA Dumps: https://www.braindumpspass.com/Linux-Foundation/CKA-practice-exam-dumps.html
Pass Linux Foundation CKA Exam – Experts Are Here To Help You: https://drive.google.com/open?id=18vUqo3H0tm6Bd9-MJCPLqFm5-BZzxW0b