[Dec 21, 2021] Fully Updated Dumps PDF - Latest CKA Exam Questions and Answers [Q22-Q43]

Share

[Dec 21, 2021] Fully Updated Dumps PDF - Latest CKA Exam Questions and Answers

100% Free CKA Exam Dumps to Pass Exam Easily from VCEEngine


How to book the Linux Foundation-CKA: Certified Kubernetes Administrator Exam

To register for the CKA exam, go to CNCF Website.


Certification Path

There are no pre-requisites for Linux Foundation-CKA: Certified Kubernetes Administrator exam and the successful completion will give you the title of Certified Kubernetes Administrator

 

NEW QUESTION 22
Create an nginx pod which loads the secret as environment variables

  • A. // create a yml file
    kubectl run nginx --image=nginx --restart=Never --dry-run -o
    yaml > nginx.yml
    // add env section below and create
    vim nginx.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: nginx
    name: nginx
    spec:
    containers:
    - image: nginx
    name: nginx
    envFrom:
    - secretRef:
    name: my-secret
    restartPolicy: Never
    kubectl apply -f nginx.yaml
    //verify
    kubectl exec -it nginx - env
  • B. // create a yml file
    kubectl run nginx --image=nginx --restart=Never --dry-run -o
    yaml > nginx.yml
    // add env section below and create
    vim nginx.yaml
    run: nginx
    name: nginx
    spec:
    containers:
    - image: nginx
    name: nginx
    envFrom:
    - secretRef:
    name: my-secret
    restartPolicy: Never
    kubectl apply -f nginx.yaml
    //verify
    kubectl exec -it nginx - env

Answer: A

 

NEW QUESTION 23
Scale the deployment webserver to

Answer:

Explanation:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\14 B.JPG

 

NEW QUESTION 24
To protect your firewall and network from single source denial of service (DoS) attacks that can overwhelm its packet buffer and cause legitimate traffic to drop, you can configure:

  • A. PGP (Packet Gateway Protocol)
  • B. PBP (Packet Buffer Protection)
  • C. PBP (Protocol Based Protection)
  • D. BGP (Border Gateway Protocol)

Answer: C

 

NEW QUESTION 25
Evict all existing pods from a node-1 and make the node unschedulable for new pods.

  • A. kubectl get nodes
    kubectl drain node-1 #It will evict pods running on node-1 to
    other nodes in the cluster
    // Verify
    kubectl get no
    When you cordon a node, the status shows "SchedulingDisabled"
  • B. kubectl get nodes
    kubectl drain node-1 #It will evict pods running on node-1 to
    other nodes in the cluster
    kubectl cordon node-1 # New pods cannot be scheduled to the
    node
    // Verify
    kubectl get no
    When you cordon a node, the status shows "SchedulingDisabled"

Answer: B

 

NEW QUESTION 26
Print pod name and start time to "/opt/pod-status" file

Answer:

Explanation:
See the solution below.
Explanation
kubect1 get pods -o=jsonpath='{range
items[*]}{.metadata.name}{"\t"}{.status.podIP}{"\n"}{end}'

 

NEW QUESTION 27
Create a job named "hello-job" with the image busybox which echos "Hello I'm running job"

  • A. kubectl create job hello-job --image=busybox --dry-run -o yaml
    -- echo "Hello I'm running job" > hello-job.yaml
    kubectl create -f hello-job.yaml
    //Verify Job
    kubectl get job
    kubectl get po
    kubectl logs hello-job-*
  • B. kubectl create job hello-job --image=busybox --dry-run -o yaml
    -- echo "Hello I'm running job" > hello-job.yaml
    kubectl create -f hello-job.yaml
    //Verify Job
    kubectl get po
    kubectl logs hello-job-*

Answer: A

 

NEW QUESTION 28
An administrator accidentally closed the commit window/screen before the commit was finished. Which two options could the administrator use to verify the progress or success of that commit task? (Choose two)

  • A. Task Manager
  • B. Traffic Logs
  • C. System Logs
  • D. Configuration Logs

Answer: A,D

 

NEW QUESTION 29
Create a pod with init container which create a file "test.txt"
in "workdir" directory. Main container should check a file
"test.txt" exists and execute sleep 9999 if the file exists.

  • A. // create an initial yaml file with this
    kubectl run init-cont-pod --image=alpine --restart=Never --dry-run -o
    yaml > init-cont-pod.yaml
    // edit the yml as below and create it
    vim init-cont-pod.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: init-cont-pod
    labels:
    app: myapp
    spec:
    volumes:
    - name: test-volume
    emptyDir: {}
    containers:
    - name: main-container
    image: busybox:1.28
    command: ['sh', '-c', 'if [ -f /workdir/test.txt ]; then sleep
    9999; fi']
    volumeMounts:
    image: busybox:1.28
    command: ['sh', '-c', "mkdir /workdir; echo >
    /workdir/test.txt"]
    volumeMounts:
    - name: test-volume
    mountPath: /workdir
    // Create the pod
    kubectl apply -f init-cont-pod.yaml
    kubectl get pods
    // Check Events by doing
    kubectl describe po init-cont-pod
    Init Containers:
    init-myservice:
    Container ID:
    docker://ebdbf5fad1c95111d9b0e0e2e743c2e347c81b8d4eb5abcccdfe1dd74524
    0d4f
    Image: busybox:1.28
    Image ID: dockerpullable://busybox@sha256:141c253bc4c3fd0a201d32dc1f493bcf3fff003b6df
    416dea4f41046e0f37d47
    Port: <none>
    Host Port: <none>
    Command:
    sh
    -c
    mkdir /workdir; echo > /workdir/test.txt
    State: Terminated Reason: Completed
  • B. // create an initial yaml file with this
    kubectl run init-cont-pod --image=alpine --restart=Never --dry-run -o
    yaml > init-cont-pod.yaml
    // edit the yml as below and create it
    vim init-cont-pod.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: init-cont-pod
    labels:
    app: myapp
    spec:
    volumes:
    - name: test-volume
    emptyDir: {}
    containers:
    - name: main-container
    image: busybox:1.28
    command: ['sh', '-c', 'if [ -f /workdir/test.txt ]; then sleep
    9999; fi']
    volumeMounts:
    - name: test-volume
    mountPath: /workdir
    initContainers:
    - name: init-myservice
    image: busybox:1.28
    command: ['sh', '-c', "mkdir /workdir; echo >
    /workdir/test.txt"]
    volumeMounts:
    - name: test-volume
    mountPath: /workdir
    // Create the pod
    kubectl apply -f init-cont-pod.yaml
    kubectl get pods
    // Check Events by doing
    kubectl describe po init-cont-pod
    Init Containers:
    init-myservice:
    Container ID:
    docker://ebdbf5fad1c95111d9b0e0e2e743c2e347c81b8d4eb5abcccdfe1dd74524
    0d4f
    Image: busybox:1.28
    Image ID: dockerpullable://busybox@sha256:141c253bc4c3fd0a201d32dc1f493bcf3fff003b6df
    416dea4f41046e0f37d47
    Port: <none>
    Host Port: <none>
    Command:
    sh
    -c
    mkdir /workdir; echo > /workdir/test.txt
    State: Terminated Reason: Completed

Answer: B

 

NEW QUESTION 30
Create PersistentVolume named task-pv-volume with storage 10Gi, access modes ReadWriteMany, storageClassName manual, and volume at /mnt/data and Create a PersistentVolumeClaim of at least 3Gi storage and access mode ReadWriteOnce and verify

  • A. vim task-pv-volume.yaml
    apiVersion: v1
    kind: PersistentVolume
    metadata:
    name: task-pv-volume
    labels:
    type: local
    spec:
    storageClassName: manual
    capacity:
    storage: 10Gi
    accessModes:
    - ReadWriteMany
    hostPath:
    path: "/mnt/data"
    kubectl apply -f task-pv-volume.yaml
    //Verify
    kubectl get pv
    vim task-pvc-volume.yaml
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
    name: task-pv-claim
    spec:
    storageClassName: manual
    accessModes:
    - ReadWriteMany
    resources:
    requests:
    storage: 3Gi
    kubectl apply -f task-pvc-volume.yaml
    //Verify
    Kuk kubectl get pvc
  • B. vim task-pv-volume.yaml
    apiVersion: v1
    kind: PersistentVolume
    metadata:
    name: task-pv-volume
    labels:
    type: local
    spec:
    storageClassName: manual
    capacity:
    storage: 10Gi
    accessModes:
    - ReadWriteMany
    hostPath:
    path: "/mnt/data"
    kubectl apply -f task-pv-volume.yaml
    //Verify
    kubectl get pv
    vim task-pvc-volume.yaml
    apiVersion: v1
    - ReadWriteMany
    resources:
    requests:
    storage: 3Gi
    kubectl apply -f task-pvc-volume.yaml
    //Verify
    Kuk kubectl get pvc

Answer: A

 

NEW QUESTION 31
Check to see how many worker nodes are ready (not including nodes tainted NoSchedule) and write the number to /opt/KUCC00104/kucc00104.txt.

Answer:

Explanation:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\15 B.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\15 C.JPG

 

NEW QUESTION 32
Create a redis pod and expose it on port 6379

  • A. kubectl run redis --image=redis --restart=Never --port=6379
    YAML File :
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: redis
    name: redis
    spec:
    containers:
    ports:
    - containerPort: 6679
    Rt restartPolicy: Alwaysf
  • B. kubectl run redis --image=redis --restart=Never --port=6379
    YAML File :
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: redis
    name: redis
    spec:
    containers:
    - image: redis
    name: redis
    ports:
    - containerPort: 6379
    Rt restartPolicy: Always

Answer: B

 

NEW QUESTION 33
Print pod name and start time to "/opt/pod-status" file

Answer:

Explanation:
kubect1 get pods -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.podIP}{"\n"}{end}'

 

NEW QUESTION 34
Check the Image version of nginx-dev pod using jsonpath

Answer:

Explanation:
kubect1 get po nginx-dev -o jsonpath='{.spec.containers[].image}{"\n"}'

 

NEW QUESTION 35
List all the pods sorted by name

Answer:

Explanation:
See the solution below.
Explanation
kubectl get pods --sort-by=.metadata.name

 

NEW QUESTION 36
Scale the deployment from 5 replicas to 20 replicas and verify

Answer:

Explanation:
kubectl scale deploy webapp --replicas=20 kubectl get deploy webapp kubectl get po -l app=webapp

 

NEW QUESTION 37
Change the label for one of the pod to env=uat and list all the pods to verify

Answer:

Explanation:
kubectl label pod/nginx-dev3 env=uat --overwrite kubectl get pods --show-labels

 

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

Answer:

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

 

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

Answer:

Explanation:
See the solution below.
Explanation
kubectl get pods -o=jsonpath="{.items[*]['metadata.name',
'metadata.namespace']}"

 

NEW QUESTION 40
Create a pod as follows:
* Name:non-persistent-redis
* container Image:redis
* Volume with name:cache-control
* Mount path:/data/redis
The pod should launch in thestagingnamespace and the volumemust notbe persistent.

Answer:

Explanation:
See the solution below.
Explanation
solution


 

NEW QUESTION 41
Undo/Rollback deployment to specific revision "1"

  • A. // Check Deployment History
    kubectl rollout history deployment webapp
    kubectl rollout undo deploymet webapp --to-revision=1
  • B. // Check Deployment History
    kubectl rollout history deployment webapp
    //Rollback to particular revision
    kubectl rollout undo deploymet webapp --to-revision=1

Answer: B

 

NEW QUESTION 42
Create a file:
/opt/KUCC00302/kucc00302.txt that lists all pods that implement service baz in namespace development.
The format of the file should be one pod name per line.

Answer:

Explanation:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\11 B.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\11 C.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\11 D.JPG

 

NEW QUESTION 43
......


Understanding of functional and technical aspects of Troubleshooting

Detect, diagnose, and remedy a variety of Kubernetes failures at the network, node, control-plane, and application levels. You will use tools included in Kubernetes, such as kubectl, as well as a variety of Linux operating system tools like systemctl, journalctl, ss, and openssl to build a comprehensive Kubernetes troubleshooting toolkit.

The following will be discussed in CNCF CKA dumps:

  • Troubleshoot cluster component failure
  • Manage container stdout & stderr logs
  • Troubleshoot Kubernetes application failures
  • Troubleshoot Kubernetes component failures
  • Troubleshoot Kubernetes connection failures
  • Evaluate cluster and node logging
  • Troubleshoot Kubernetes node failures
  • Understand how to monitor applications
  • Troubleshoot application failure
  • Troubleshoot networking

 

Free CKA Exam Questions CKA Actual Free Exam Questions: https://www.vceengine.com/CKA-vce-test-engine.html

Verified CKA dumps and 63 unique questions: https://drive.google.com/open?id=1xkHECltyB0MUvlSZCKDmb1ZIO_NNi5WN