CKA Dumps

CKA Free Practice Test

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

QUESTION 6

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.
Solution:
solution
F:WorkData Entry WorkData Entry20200827CKA11 B.JPG
CKA dumps exhibit
F:WorkData Entry WorkData Entry20200827CKA11 C.JPG
CKA dumps exhibit
F:WorkData Entry WorkData Entry20200827CKA11 D.JPG
CKA dumps exhibit

Does this meet the goal?

Correct Answer: A

QUESTION 7

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

QUESTION 8

Create a pod with image nginx called nginx and allow traffic on port 80
Solution:
kubectl run nginx --image=nginx --restart=Never --port=80

Does this meet the goal?

Correct Answer: A

QUESTION 9

Get list of all pods in all namespaces and write it to file “/opt/pods-list.yaml”
Solution:
kubectl get po –all-namespaces > /opt/pods-list.yaml

Does this meet the goal?

Correct Answer: A

QUESTION 10

Create a pod named kucc8 with a single app container for each of the following images running inside (there may be between 1 and 4 images specified): nginx + redis + memcached.
Solution:

solution
F:WorkData Entry WorkData Entry20200827CKA5 B.JPG
CKA dumps exhibit
F:WorkData Entry WorkData Entry20200827CKA5 C.JPG
CKA dumps exhibit
F:WorkData Entry WorkData Entry20200827CKA5 D.JPG
CKA dumps exhibit

Does this meet the goal?

Correct Answer: A