You are on page 1of 14

Fast2test Guarantee All Exams 100% Pass One Time!

➱Vendor: Linux Foundation

➱Exam Code: CKA

➱Exam Name: Certified Kubernetes Administrator (CKA) Program Exam

New Updated Questions from Fast2test (Updated in Sep, 2021)

Visit Fast2test and Download Full Version CKA Exam Dumps

NEW QUESTION 12
List the nginx pod with custom columns POD_NAME and POD_STATUS

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

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

NEW QUESTION 13
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 thestagingnamespace and the volumemust notbe persistent.
Answer:
Explanation:
See the solution below.
Explanation
solution

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

NEW QUESTION 14
Create an nginx pod which reads username as the environment variable
A. // create a yml file
kubectl run nginx --image=nginx --restart=Never --dry-run -o
yaml > nginx.yml
// add env section below and create
apiVersion: v1
kind: Pod
metadata:
labels:
run: nginx
name: nginx
spec:
containers:
- image: nginx
name: nginx
env:

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

- name: USER_NAME
restartPolicy: Never
kubectl create -f nginx.yml
//Verify
kubectl exec -it nginx - env
B. // create a yml file
kubectl run nginx --image=nginx --restart=Never --dry-run -o
yaml > nginx.yml
// add env section below and create
apiVersion: v1
kind: Pod
metadata:
labels:
run: nginx
name: nginx
spec:
containers:
- image: nginx
name: nginx
env:
- name: USER_NAME
valueFrom:
secretKeyRef:
name: my-secret
key: username
restartPolicy: Never
kubectl create -f nginx.yml
//Verify
kubectl exec -it nginx - env
Answer: B

NEW QUESTION 15
List the nginx pod with custom columns POD_NAME and POD_STATUS
Answer:
Explanation:
kubectl get po -o=custom-columns="POD_NAME:.metadata.name,
POD_STATUS:.status.containerStatuses[].state"

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

NEW QUESTION 16
List all the pods sorted by name
Answer:
Explanation:
kubect1 get pods --sort-by=.metadata.name

NEW QUESTION 17
Create the service as type NodePort with the port 32767 for the nginx pod with the pod selector app:
my-nginx
Answer:
Explanation:
kubectl run nginx --image=nginx --restart=Never -- labels=app=nginx --port=80 --dry-run -o yaml >
nginx-pod.yaml

NEW QUESTION 18
Create a snapshot of the etcd instance running at https://127.0.0.1:2379, saving the snapshot to the file
path
/srv/data/etcd-snapshot.db.
The following TLS certificates/key are supplied for connecting to the server with etcdctl:
CA certificate: /opt/KUCM00302/ca.crt
Client certificate: /opt/KUCM00302/etcd-client.crt
Client key: Topt/KUCM00302/etcd-client.key
Answer:
Explanation:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\18 C.JPG

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

NEW QUESTION 19
Get list of persistent volumes and persistent volume claim in the cluster
Answer:
Explanation:
kubectl get pv kubectl get pvc

NEW QUESTION 20
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.
Answer:
Explanation:
See the solution below.
Explanation

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

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

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

NEW QUESTION 21
Create a redis pod and expose it on port 6379
A. kubectl run redis --image=redis --restart=Never --port=6379
YAML File :
apiVersion: v1
kind: Pod
metadata:
labels:
run: redis
name: redis
spec:
containers:
ports:
- containerPort: 6679
Rt restartPolicy: Alwaysf
B. kubectl run redis --image=redis --restart=Never --port=6379
YAML File :

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

apiVersion: v1
kind: Pod
metadata:
labels:
run: redis
name: redis
spec:
containers:
- image: redis
name: redis
ports:
- containerPort: 6379
Rt restartPolicy: Always
Answer: B

NEW QUESTION 22
Check to see how many worker nodes are ready (not including nodes tainted NoSchedule) and write the
number to /opt/KUCC00104/kucc00104.txt.
Answer:
Explanation:
See the solution below.
Explanation
solution

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

NEW QUESTION 23
Delete persistent volume and persistent volume claim
Answer:
Explanation:
kubectl delete pvc task-pv-claim kubectl delete pv task-pv-volume // Verify Kubectl get pv,pvc

NEW QUESTION 24
Score: 4%

Task
Create a persistent volume with name app-data , of capacity 1Gi and access mode ReadOnlyMany. The
type of volume is hostPath and its location is /srv/app-data .
Answer:
Explanation:
See the solution below.
Explanation
Solution:
#vi pv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: app-config
spec:
capacity:
storage: 1Gi
accessModes:
- ReadOnlyMany
hostPath:
path: /srv/app-config

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

#
kubectl create -f pv.yaml

NEW QUESTION 25
Create a busybox pod and add "sleep 3600" command
Answer:
Explanation:
kubectl run busybox --image=busybox --restart=Never -- /bin/sh -c "sleep 3600"

NEW QUESTION 26
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.
A. 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

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html
Fast2test Guarantee All Exams 100% Pass One Time!

# 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
B. 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:
- 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=dev
Answer: A

NEW QUESTION 27
......

CKA Exam Dumps CKA Exam Questions CKA PDF Dumps

https://www.fast2test.com/CKA-premium-file.html

You might also like