Go Back on CKA Exam
Available in 1, 3, 6 and 12 Months Free Updates Plans
PDF: $15 $60

Test Engine: $20 $80

PDF + Engine: $25 $99

CKA Practice Test


Page 1 out of 13 Pages

Schedule a pod as follows:
Name: nginx-kusc00101
Image: nginx
Node selector: disk=ssd






Answer: See the solution below.
Explanation:
solution

Create a Kubernetes secret asfollows:
Name: super-secret
password: bob
Create a pod namedpod-secrets-via-file, using theredisImage, which mounts a secret
namedsuper-secretat/secrets.
Create a second pod namedpod-secrets-via-env, using theredisImage, which exports
passwordasCONFIDENTIAL






Answer: See the solution below.
Explanation:
solution


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: See the solution below.
Explanation:
solution

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






Answer: See the solution below.
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"

List all the pods showing name and namespace with a json path expression






Answer: See the solution below.
Explanation:
kubectl get pods -o=jsonpath="{.items[*]['metadata.name',
'metadata.namespace']}"


Page 1 out of 13 Pages