Free CKA Exam Braindumps (page: 6)

Page 5 of 31

Check the Image version of nginx-dev pod using jsonpath

  1. Solution:
    kubect1 get po nginx-dev -o
    jsonpath='{.spec.containers[].image}{"\n"}'

Answer(s): A



Create a busybox pod and add "sleep 3600" command

  1. Solution:

    kubectl run busybox --image=busybox --restart=Never -- /bin/sh -c "sleep 3600"

Answer(s): A



Create an nginx pod and list the pod with different levels of verbosity

  1. 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

Answer(s): A



List the nginx pod with custom columns POD_NAME and POD_STATUS

  1. Solution:
    kubectl get po -o=custom-columns="POD_NAME:.metadata.name,

    POD_STATUS:.status.containerStatuses[].state"

Answer(s): A






Post your Comments and Discuss Linux Foundation CKA exam with other Community members: