Free CKA Exam Braindumps (page: 6)

Page 6 of 31

List all the pods sorted by name

  1. Solution:

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

Answer(s): A



List all the pods sorted by created timestamp

  1. Solution:
    kubect1 get pods--sort-by=.metadata.creationTimestamp

Answer(s): A



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

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

Answer(s): A



List "nginx-dev" and "nginx-prod" pod and delete those pods

  1. Solution:

    kubect1 get pods -o wide
    kubectl delete po "nginx-dev"
    kubectl delete po "nginx-prod"

Answer(s): A



Page 6 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