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.
Solution:
solution
F:WorkData Entry WorkData Entry20200827CKA13 B.JPG
F:WorkData Entry WorkData Entry20200827CKA13 C.JPG
F:WorkData Entry WorkData Entry20200827CKA13 D.JPG
Does this meet the goal?
Correct Answer:A
Configure the kubelet systemd-managed service, on the nodelabelled withname=wk8s-node-1, tolaunch a pod containing a singlecontainer of Imagehttpdnamedwebtoolautomatically. Any spec filesrequired should be placed in the/etc/kubernetes/manifestsdirectoryon the node.
You canssh to theappropriate node using:
[student@node-1] $ sshwk8s-node-1
You can assume elevatedprivileges on the node with thefollowing command:
[student@wk8s-node-1] $ |sudo ?Ci
Solution:
solution
F:WorkData Entry WorkData Entry20200827CKA21 C.JPG
F:WorkData Entry WorkData Entry20200827CKA21 D.JPG
F:WorkData Entry WorkData Entry20200827CKA21 E.JPG
F:WorkData Entry WorkData Entry20200827CKA21 F.JPG
F:WorkData Entry WorkData Entry20200827CKA21 G.JPG
Does this meet the goal?
Correct Answer:A
List all the pods sorted by name
Solution:
kubectl get pods --sort-by=.metadata.name
Does this meet the goal?
Correct Answer:A
Create an nginx pod and list the pod with different levels of verbosity
Solution:
// create a pod
kubectl run nginx --image=nginx --restart=Never --port=80
// List the pod with different verbosity kubectl get po nginx --v=7
kubectl get po nginx --v=8 kubectl get po nginx --v=9
Does this meet the goal?
Correct Answer:A
List all the pods sorted by name
Solution:
kubect1 get pods --sort-by=.metadata.name
Does this meet the goal?
Correct Answer:A