Linux Foundation CKA Exam (page: 3)
Linux Foundation Certified Kubernetes Administrator
Updated on: 25-Dec-2025

Viewing Page 3 of 26

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



Create a pod that having 3 containers in it? (Multi-Container)

  1. Solution:

    image=nginx, image=redis, image=consul
    Name nginx container as "nginx-container"
    Name redis container as "redis-container"
    Name consul container as "consul-container"
    Create a pod manifest file for a container and append container section for rest of the images
    kubectl run multi-container --generator=run-pod/v1 --image=nginx -- dry-run -o yaml > multi-container.yaml
    # then
    vim multi-container.yaml
    apiVersion: v1
    kind: Pod
    metadata:


    labels:
    run: multi-container
    name: multi-container
    spec:
    containers:
    - image: nginx
    name: nginx-container
    - image: redis
    name: redis-container
    - image: consul
    name: consul-container
    restartPolicy: Always

Answer(s): A



Create 2 nginx image pods in which one of them is labelled with env=prod and another one labelled with env=dev and verify the same.

  1. Solution:

    kubectl run --generator=run-pod/v1 --image=nginx -- labels=env=prod nginx-prod --dry-run -o yaml > nginx-prodpod.yaml Now, edit nginx-prod-pod.yaml file and remove entries like "creationTimestamp:
    null" "dnsPolicy: ClusterFirst"
    vim nginx-prod-pod.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    env: prod
    name: nginx-prod
    spec:
    containers:
    - image: nginx
    name: nginx-prod
    restartPolicy: Always
    # kubectl create -f nginx-prod-pod.yaml
    kubectl run --generator=run-pod/v1 --image=nginx --
    labels=env=dev nginx-dev --dry-run -o yaml > nginx-dev-pod.yaml apiVersion: v1
    kind: Pod
    metadata:
    labels:
    env: dev
    name: nginx-dev
    spec:


    containers:
    - image: nginx
    name: nginx-dev
    restartPolicy: Always
    # kubectl create -f nginx-prod-dev.yaml
    Verify :
    kubectl get po --show-labels
    kubectl get po -l env=prod
    kubectl get po -l env=dev

Answer(s): A



Get IP address of the pod ­ "nginx-dev"

  1. Solution:

    Kubect1 get po -o wide
    Using JsonPath
    kubect1 get pods -o=jsonpath='{range
    .items[*]}{.metadata.name}{"\t"}{.status.podIP}{"\n"}{end}'

Answer(s): A



Viewing Page 3 of 26



Share your comments for Linux Foundation CKA exam with other users:

Antony 11/28/2023 12:13:00 AM

great material thanks
AUSTRALIA


Thembelani 5/30/2023 2:22:00 AM

anyone who wrote this exam recently
Anonymous


P 9/16/2023 1:27:00 AM

ok they re good
Anonymous


Jorn 7/13/2023 5:05:00 AM

relevant questions
UNITED KINGDOM


AM 6/20/2023 7:54:00 PM

please post
UNITED STATES


Nagendra Pedipina 7/13/2023 2:22:00 AM

q:42 there has to be a image in the question to choose what does it mean from the options
INDIA


BrainDumpee 11/18/2023 1:36:00 PM

looking for cphq dumps, where can i find these for free? please and thank you.
UNITED STATES


sheik 10/14/2023 11:37:00 AM

@aarun , thanks for the information. it would be great help if you share your email
Anonymous


Random user 12/11/2023 1:34:00 AM

1z0-1078-23 need this dumps
Anonymous


labuschanka 11/16/2023 6:06:00 PM

i gave the microsoft azure az-500 tests and prepared from this site as it has latest mock tests available which helped me evaluate my performance and score 919/1000
Anonymous


Marianne 10/22/2023 11:57:00 PM

i cannot see the button to go to the questions
Anonymous


sushant 6/28/2023 4:52:00 AM

good questions
EUROPEAN UNION


A\MAM 6/27/2023 5:17:00 PM

q-6 ans-b correct. https://docs.paloaltonetworks.com/pan-os/9-1/pan-os-cli-quick-start/use-the-cli/commit-configuration-changes
UNITED STATES


unanimous 12/15/2023 6:38:00 AM

very nice very nice
Anonymous


akminocha 9/28/2023 10:36:00 AM

please help us with 1z0-1107-2 dumps
INDIA


Jefi 9/4/2023 8:15:00 AM

please upload the practice questions
Anonymous


Thembelani 5/30/2023 2:45:00 AM

need this dumps
Anonymous


Abduraimov 4/19/2023 12:43:00 AM

preparing for this exam is overwhelming. you cannot pass without the help of these exam dumps.
UNITED KINGDOM


Puneeth 10/5/2023 2:06:00 AM

new to this site but i feel it is good
EUROPEAN UNION


Ashok Kumar 1/2/2024 6:53:00 AM

the correct answer to q8 is b. explanation since the mule app has a dependency, it is necessary to include project modules and dependencies to make sure the app will run successfully on the runtime on any other machine. source code of the component that the mule app is dependent of does not need to be included in the exported jar file, because the source code is not being used while executing an app. compiled code is being used instead.
Anonymous


Merry 7/30/2023 6:57:00 AM

good questions
Anonymous


VoiceofMidnight 12/17/2023 4:07:00 PM

Delayed the exam until December 29th.
UNITED STATES


Umar Ali 8/29/2023 2:59:00 PM

A and D are True
Anonymous


vel 8/28/2023 9:17:09 AM

good one with explanation
Anonymous


Gurdeep 1/18/2024 4:00:15 PM

This is one of the most useful study guides I have ever used.
CANADA