CKA Dumps

CKA Free Practice Test

Linux-Foundation CKA: Certified Kubernetes Administrator (CKA) Program

QUESTION 26

Create a pod as follows:
CKA dumps exhibit Name:non-persistent-redis
CKA dumps exhibit container Image:redis
CKA dumps exhibit Volume with name:cache-control
CKA dumps exhibit Mount path:/data/redis
The pod should launch in thestagingnamespace and the volumemust notbe persistent.
Solution:
solution
F:WorkData Entry WorkData Entry20200827CKA13 B.JPG
CKA dumps exhibit
F:WorkData Entry WorkData Entry20200827CKA13 C.JPG
CKA dumps exhibit
F:WorkData Entry WorkData Entry20200827CKA13 D.JPG
CKA dumps exhibit

Does this meet the goal?

Correct Answer: A

QUESTION 27

Create and configure the servicefront-end-serviceso it's accessiblethroughNodePortand routes to theexisting pod namedfront-end.
Solution:
solution
F:WorkData Entry WorkData Entry20200827CKA8 B.JPG
CKA dumps exhibit

Does this meet the goal?

Correct Answer: A

QUESTION 28

List all the pods sorted by created timestamp
Solution:
kubect1 get pods--sort-by=.metadata.creationTimestamp

Does this meet the goal?

Correct Answer: A

QUESTION 29

Perform the following tasks:
CKA dumps exhibit Add an init container tohungry-bear(which has beendefined in spec file
/opt/KUCC00108/pod-spec-KUCC00108.yaml)
CKA dumps exhibit The init container should createan empty file named/workdir/calm.txt
CKA dumps exhibit If/workdir/calm.txtis notdetected, the pod should exit
CKA dumps exhibit Once the spec file has beenupdatedwith the init containerdefinition, the pod should becreated
Solution:
solution
F:WorkData Entry WorkData Entry20200827CKA4 B.JPG
CKA dumps exhibit
F:WorkData Entry WorkData Entry20200827CKA4 C.JPG
CKA dumps exhibit
F:WorkData Entry WorkData Entry20200827CKA4 D.JPG
CKA dumps exhibit

Does this meet the goal?

Correct Answer: A

QUESTION 30

Create 2 nginx image pods in which one of them is labelled with env=prod and another one labelled with
env=dev and verify the same.
Solution:
kubectl run --generator=run-pod/v1 --image=nginx -- labels=env=prod nginx-prod --dry-run -o yaml > nginx-prodpod.yaml Now, edit nginx-prod-pod.yaml file and remove entries like ??creationTimestamp: null?? ??dnsPolicy: ClusterFirst??
vim nginx-prod-pod.yaml apiVersion: v1
kind: Pod metadata: labels: env: prod
name: nginx-prod spec:
containers:
- image: nginx name: nginx-prod
restartPolicy: Always
# kubectl create -f nginx-prod-pod.yaml
kubectl run --generator=run-pod/v1 --image=nginx -- labels=env=dev nginx-dev --dry-run -o yaml > nginx-dev-pod.yaml apiVersion: v1
kind: Pod metadata: labels: env: dev
name: nginx-dev
spec: containers:
- image: nginx name: nginx-dev
restartPolicy: Always
# kubectl create -f nginx-prod-dev.yaml Verify :
kubectl get po --show-labels kubectl get po -l env=prod kubectl get po -l env=dev

Does this meet the goal?

Correct Answer: A