Free CKA Exam Braindumps (page: 1)

Page 1 of 31

Create a namespace called 'development' and a pod with image nginx called nginx on this namespace.

  1. Solution:

    kubectl create namespace development
    kubectl run nginx --image=nginx --restart=Never -n development

Answer(s): A



Create a nginx pod with label env=test in engineering namespace See the solution below.

  1. Solution:

    kubectl run nginx --image=nginx --restart=Never --labels=env=test --namespace=engineering --dry- run -o yaml > nginx-pod.yaml
    kubectl run nginx --image=nginx --restart=Never --labels=env=test --namespace=engineering --dry- run -o yaml | kubectl create -n engineering -f ­
    YAML File:

    apiVersion: v1
    kind: Pod
    metadata:
    name: nginx
    namespace: engineering
    labels:
    env: test
    spec:
    containers:
    - name: nginx
    image: nginx


    imagePullPolicy: IfNotPresent
    restartPolicy: Never

    kubectl create -f nginx-pod.yaml

Answer(s): A



Get list of all pods in all namespaces and write it to file "/opt/pods-list.yaml"

  1. Solution:

    kubectl get po ­all-namespaces > /opt/pods-list.yaml

Answer(s): A



Create a pod with image nginx called nginx and allow traffic on port 80

  1. Solution:
    kubectl run nginx --image=nginx --restart=Never --port=80

Answer(s): A



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