Linux Foundation CKA Exam Questions
Certified Kubernetes Administrator (Page 3 )

Updated On: 21-Feb-2026

List pod logs named "frontend" and search for the pattern "started" and write it to a file "/opt/error- logs"

  1. Solution:
    Kubectl logs frontend | grep -i "started" > /opt/error-logs

Answer(s): A



Create a pod that echo "hello world" and then exists. Have the pod deleted automatically when it's completed

  1. Solution:

    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"

Answer(s): A



Create a pod with environment variables as var1=value1.Check the environment variable in pod

  1. Solution:

    kubectl run nginx --image=nginx --restart=Never --env=var1=value1 # then
    kubectl exec -it nginx -- env
    # or
    kubectl exec -it nginx -- sh -c 'echo $var1'
    # or
    kubectl describe po nginx | grep value1

Answer(s): A



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






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

Join the CKA Discussion