[Oct 14, 2021] CKA Dumps Full Questions - Exam Study Guide [Q26-Q51]

Share

[Oct 14, 2021] CKA Dumps Full Questions - Exam Study Guide

Kubernetes Administrator  Free Certification Exam Material from Actual4Exams with 63 Questions

NEW QUESTION 26
Delete persistent volume and persistent volume claim

Answer:

Explanation:
kubectl delete pvc task-pv-claim kubectl delete pv task-pv-volume // Verify Kubectl get pv,pvc

 

NEW QUESTION 27
What are the differences between using a service versus using an application for Security Policy match?

  • A. Use of a "service" enables the firewall to take action after enough packets allow for App-ID identification
  • B. Use of a "service" enables the firewall to take immediate action with the first observed packet based on port numbers. Use of an application allows the firewall to take action after enough packets allow for App-ID identification regardless of the ports being used
  • C. There are no differences between "service" or "application." Use of an "application simplifies configuration by allowing use of a friendly application name instead of port numbers.
  • D. Use of a "service" enables the firewall to take immediate action with the first observed packet based on port numbers. Use of an "application allows the firewall to take immediate action if the port being used is a member of the application standard port list

Answer: D

 

NEW QUESTION 28
Create a redis pod, and have it use a non-persistent storage
(volume that lasts for the lifetime of the Pod)

  • A. vim redis-pod-vol.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: redis
    spec:
    containers:
    - name: redis
    image: redis
    ports:
    - containerPort: 6379
    volumeMounts:
    - mountPath: /data
    name: redis-storage
    volumes:
    - name: redis-storage
    emptyDir: {}
    kubectl apply -f redis-pod-vol.yaml
  • B. vim redis-pod-vol.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: redis
    spec:
    containers:
    - name: redis
    image: redis
    ports:
    - containerPort: 6679
    volumeMounts:
    - mountPath: /data
    name: redis-storage
    volumes:
    - name: redis-storage
    emptyDir: {}
    kubectl apply -f redis-pod-vol.yaml

Answer: A

 

NEW QUESTION 29
Score: 13%

Task
A Kubernetes worker node, named wk8s-node-0 is in state NotReady. Investigate why this is the case, and perform any appropriate steps to bring the node to a Ready state, ensuring that any changes are made permanent.

Answer:

Explanation:
See the solution below.
Explanation
Solution:
sudo -i
systemctl status kubelet
systemctl start kubelet
systemctl enable kubelet

 

NEW QUESTION 30
Create a deployment as follows:
Name: nginx-app
Using container nginx with version 1.11.10-alpine
The deployment should contain
Next, deploy the application with new version , by performing a rolling update.
Finally, rollback that update to the previous version

Answer:

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

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

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

 

NEW QUESTION 31
Schedule a pod as follows:
* Name: nginx-kusc00101
* Image: nginx
* Node selector: disk=ssd

Answer:

Explanation:
See the solution below.
Explanation
solution


 

NEW QUESTION 32
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 33
Watch the job that runs 10 times one by one and verify 10 pods are created and delete those after it's completed

Answer:

Explanation:
kubectl get job -w kubectl get po kubectl delete job hello-job

 

NEW QUESTION 34
Undo the deployment to the previous version 1.17.1 and verify Image has the previous version

Answer:

Explanation:
kubectl rollout undo deploy webapp kubectl describe deploy webapp | grep Image

 

NEW QUESTION 35
Get the pods with label env=dev and output the labels

Answer:

Explanation:
kubectl get pods -l env=dev --show-labels

 

NEW QUESTION 36
Score: 7%

Task
Create a new nginx Ingress resource as follows:
* Name: ping
* Namespace: ing-internal
* Exposing service hi on path /hi using service port 5678

Answer:

Explanation:
See the solution below.
Explanation
Solution:
vi ingress.yaml
#
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ping
namespace: ing-internal
spec:
rules:
- http:
paths:
- path: /hi
pathType: Prefix
backend:
service:
name: hi
port:
number: 5678
#
kubectl create -f ingress.yaml

 

NEW QUESTION 37
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 the staging namespace and the volume must not be persistent.

Answer:

Explanation:
See the solution below.
Explanation
solution


 

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

Answer:

Explanation:
See the solution below.
Explanation
kubectl create namespace development
kubectl run nginx --image=nginx --restart=Never -n development

 

NEW QUESTION 39
Get the list of pods of webapp deployment

  • A. // Get the label of the deployment
    kubectl get deploy --show-labels
    kubectl get pods -l app=webapp
  • B. // Get the label of the deployment
    kubectl get deploy --show-labels
    // Get the pods with that label
    kubectl get pods -l app=webapp

Answer: B

 

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

Answer:

Explanation:
See the solution below.
Explanation
kubectl get po -all-namespaces > /opt/pods-list.yaml

 

NEW QUESTION 41
Create a Pod with three busy box containers with commands "ls; sleep 3600;", "echo Hello World; sleep 3600;" and "echo this is the third container; sleep 3600" respectively and check the status

  • A. // first create single container pod with dry run flag
    kubectl run busybox --image=busybox --restart=Always --dry-run
    -o yaml -- bin/sh -c "sleep 3600; ls" > multi-container.yaml
    // edit the pod to following yaml and create it
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: busybox
    name: busybox
    spec:
    containers:
    - args:
    - bin/sh
    - -c
    - ls; sleep 3600
    - echo Hello world; sleep 3600
    image: busybox
    name: busybox-container-2
    - args:
    - bin/sh
    - -c
    - echo this is third container; sleep 3600
    image: busybox
    name: busybox-container-3
    restartPolicy: Always
    // Verify
    Kubectl get pods
  • B. // first create single container pod with dry run flag
    kubectl run busybox --image=busybox --restart=Always --dry-run
    -o yaml -- bin/sh -c "sleep 3600; ls" > multi-container.yaml
    // edit the pod to following yaml and create it
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: busybox
    name: busybox
    spec:
    containers:
    - args:
    - bin/sh
    - -c
    - ls; sleep 3600
    image: busybox
    name: busybox-container-1
    - args:
    - bin/sh
    - -c
    - echo Hello world; sleep 3600
    image: busybox
    name: busybox-container-2
    - args:
    - bin/sh
    - -c
    - echo this is third container; sleep 3600
    image: busybox
    name: busybox-container-3
    restartPolicy: Always
    // Verify
    Kubectl get pods

Answer: B

 

NEW QUESTION 42
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 43
Verify certificate expiry date for ca certificate in /etc/kubernetes/pki

Answer:

Explanation:
openssl x509 -in ca.crt -noout -text | grep -i validity -A 4

 

NEW QUESTION 44
Which one is the correct configuration?

  • A. &Panorama
  • B. @Panorama
  • C. $Panorama
  • D. #Panorama

Answer: C

 

NEW QUESTION 45
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 46
Check to see how many worker nodes are ready (not including nodes taintedNoSchedule) and write the number to/opt/KUCC00104/kucc00104.txt.

Answer:

Explanation:
See the solution below.
Explanation
solution

 

NEW QUESTION 47
Score: 4%

Task
Create a pod named kucc8 with a single app container for each of the following images running inside (there may be between 1 and 4 images specified): nginx + redis + memcached .

Answer:

Explanation:
See the solution below.
Explanation
Solution:
kubectl run kucc8 --image=nginx --dry-run -o yaml > kucc8.yaml
# vi kucc8.yaml
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
name: kucc8
spec:
containers:
- image: nginx
name: nginx
- image: redis
name: redis
- image: memcached
name: memcached
- image: consul
name: consul
#
kubectl create -f kucc8.yaml
#12.07

 

NEW QUESTION 48
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 49
Label a node as app=test and verify

Answer:

Explanation:
kubectl label node node-name app=test // Verify kubectl get no -show-labels kubectl get no -l app=test

 

NEW QUESTION 50
Create an nginx pod and list the pod with different levels of verbosity

  • A. // create a pod
    kubectl run nginx --image=nginx --restart=Never --port=80
    // List the pod with different verbosity
    kubectl get po nginx --v=7
    kubectl get po nginx --v=6
    kubectl get po nginx --v=9
  • B. // create a pod
    kubectl run nginx --image=nginx --restart=Never --port=80
    // List the pod with different verbosity
    kubectl get po nginx --v=7
    kubectl get po nginx --v=8
    kubectl get po nginx --v=9

Answer: B

 

NEW QUESTION 51
......

Dumps Brief Outline Of The CKA Exam: https://www.actual4exams.com/CKA-valid-dump.html

Use Real CKA - 100% Cover Real Exam Questions: https://drive.google.com/open?id=1f4KzWk46D3pntbFRG2UPHFsVek4RCe_X