Free CKA Exam Braindumps (page: 3)

Page 3 of 31

Get list of all the pods showing name and namespace with a jsonpath expression.

  1. Solution:

    kubectl get pods -o=jsonpath="{.items[*]['metadata.name' , 'metadata.namespace']}"

Answer(s): A



Check the image version in pod without the describe command

  1. Solution:

    kubectl get po nginx -o
    jsonpath='{.spec.containers[].image}{"\n"}'

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



List all the pods sorted by name

  1. Solution:

    kubect1 get pods --sort-by=.metadata.name

Answer(s): A



Page 3 of 31



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

Atsushi commented on January 13, 2024
That's good!!
Anonymous
upvote