Authentic Best resources for CKA Test Engine Practice Exam [Q34-Q59]

Share

Authentic Best resources for CKA Test Engine Practice Exam

[2022] CKA PDF Questions - Perfect Prospect To Go With DumpsTests Practice Exam


The benefit of obtaining the Linux Foundation-CKA: Certified Kubernetes Administrator Exam Certification

A Kubernetes certification makes your resume look good and stand out from the competition. As companies rely more and more on k8s, your expertise will be an immediate asset. A top certification like the CKA or the CKAD gives you mighty potential for a better salary. Passing these exams is not an easy task, so companies seeking k8s engineers are willing to pay more because the certifications show that you’re not only experienced, but you truly understand the platform. Achieve personal growth. Passing these exams is rewarding on a personal level: you sacrificed free time and fun to study and prepare, so passing the exam is rewarding in itself. Next, you may even move onto another skillset to focus on.

 

NEW QUESTION 34
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

 

NEW QUESTION 35
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 36
Create a deployment named "myapp" that having 2 replicas with
nginx image and expose deployment as service named "myservice"

  • A. // Create a YAML Template
    kubectl create deploy myapp --image=nginx --dry-run -o yaml >
    myapp.yaml
    //Update replicas=2 in myapp.yaml file
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    labels:
    app: myapp
    name: myapp
    spec:
    replicas: 2
    selector:
    matchLabels:
    app: myapp
    template:
    metadata:
    labels:
    app: myapp
    spec:
    containers:
    - image: nginx
    name: nginx
    // Create deployment
    kubectl create -f myapp.yaml
    // Creating YAML template for service
    kubectl expose deployment myapp --type=ClusterIP --port=60 --
    target-port=60 --name=myservice --dry-run -o yaml >
    myservice.yaml
    YAML File:
    apiVersion: v1
    kind: Service
    metadata:
    labels:
    app: myapp
    name: myservice
    spec:
    ports:
    - port: 60
    protocol: TCP
    targetPort: 80
    selector:
    app: myapp
    type: ClusterIP
    kubectl get svc
    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
    AGE
    kubernetes ClusterIP 10.2.0.1 <none> 443/TCP
    158d
    myservice ClusterIP 10.2.96.175 <none> 80/TCP
    40s
  • B. // Create a YAML Template
    kubectl create deploy myapp --image=nginx --dry-run -o yaml >
    myapp.yaml
    //Update replicas=2 in myapp.yaml file
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    labels:
    app: myapp
    name: myapp
    spec:
    replicas: 2
    selector:
    matchLabels:
    app: myapp
    template:
    metadata:
    labels:
    app: myapp
    spec:
    containers:
    - image: nginx
    name: nginx
    // Create deployment
    kubectl create -f myapp.yaml
    // Creating YAML template for service
    kubectl expose deployment myapp --type=ClusterIP --port=80 --
    target-port=80 --name=myservice --dry-run -o yaml >
    myservice.yaml
    YAML File:
    apiVersion: v1
    kind: Service
    metadata:
    labels:
    app: myapp
    name: myservice
    spec:
    ports:
    - port: 80
    protocol: TCP
    targetPort: 80
    selector:
    app: myapp
    type: ClusterIP
    kubectl get svc
    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
    AGE
    kubernetes ClusterIP 10.2.0.1 <none> 443/TCP
    158d
    myservice ClusterIP 10.2.96.175 <none> 80/TCP
    40s

Answer: B

 

NEW QUESTION 37
Set the node namedek8s-node-1asunavailable and reschedule all thepods running on it.

Answer:

Explanation:
See the solution below.
Explanation
solution

 

NEW QUESTION 38
Set the node named ek8s-node-1 as unavailable and reschedule all the pods running on it.

Answer:

Explanation:
See the solution below.
Explanation
solution

 

NEW QUESTION 39
Create an nginx pod with containerPort 80 and it should check the pod running at endpoint / healthz on port 80 and verify and delete the pod.

  • A. kubectl run nginx --image=nginx --restart=Always --port=80 --
    dry-run -o yaml > nginx-pod.yaml
    // add the livenessProbe section and create
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    containers:
    - image: nginx
    name: nginx
    ports:
    - containerPort: 60
    livenessProbe:
    httpGet:
    path: /healthz
    port: 60
    restartPolicy: Always
    kubectl create -f nginx-pod.yaml
    // verify
    kubectl describe pod nginx | grep -i readiness
    kubectl delete po nginx
  • B. kubectl run nginx --image=nginx --restart=Always --port=80 --
    dry-run -o yaml > nginx-pod.yaml
    // add the livenessProbe section and create
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: nginx
    name: nginx
    spec:
    containers:
    - image: nginx
    name: nginx
    ports:
    - containerPort: 80
    livenessProbe:
    httpGet:
    path: /healthz
    port: 80
    restartPolicy: Always
    kubectl create -f nginx-pod.yaml
    // verify
    kubectl describe pod nginx | grep -i readiness
    kubectl delete po nginx

Answer: B

 

NEW QUESTION 40
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 41
Create an nginx pod and list the pod with different levels of verbosity

Answer:

Explanation:
See the solution below.
Explanation
// 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

 

NEW QUESTION 42
Monitor the logs of pod foo and:
* Extract log lines corresponding unable-to-access-website
* Write them to/opt/KULM00201/foo

Answer:

Explanation:
See the solution below.
Explanation
solution

 

NEW QUESTION 43
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
F:\Work\Data Entry Work\Data Entry\20200827\CKA\5 B.JPG

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

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

 

NEW QUESTION 44
Check the history of the specific revision of that deployment

Answer:

Explanation:
kubectl rollout history deploy webapp --revision=3

 

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

  • A. 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
  • B. 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
    labels:
    run: multi-container
    name: multi-container
    spec:
    containers:
    - image: nginx
    name: nginx-container
    - image: redis
    name: consul-container
    restartPolicy: Always

Answer: A

 

NEW QUESTION 46
Add a taint to node "worker-2" with effect as "NoSchedule" and
list the node with taint effect as "NoSchedule"

  • A. // Add taint to node "worker-2"
    kubectl taint nodes worker-2 key=value:NoSchedule
    .items[*]}{.metadata.name} {.spec.taints[?(
    @.effect=='NoSchedule' )].effect}{\"\n\"}{end}" | awk 'NF==2
    {print $0}'
  • B. // Add taint to node "worker-2"
    kubectl taint nodes worker-2 key=value:NoSchedule
    // Verify
    // Using "custom-coloumns" , you can customize which coloumn to
    be printed
    kubectl get nodes -o customcolumns=NAME:.metadata.name,TAINTS:.spec.taints --no-headers
    // Using jsonpath
    kubectl get nodes -o jsonpath="{range
    .items[*]}{.metadata.name} {.spec.taints[?(
    @.effect=='NoSchedule' )].effect}{\"\n\"}{end}" | awk 'NF==2
    {print $0}'

Answer: B

 

NEW QUESTION 47
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 48
A Kubernetes worker node, named .Investigate why this is the case,
andperform any appropriate steps tobring the node to a state,ensuring that any changes are madepermanent.
You cansshto the failednode using:
[student@node-1] $ | sshWk8s-node-0
You can assume elevatedprivileges on the node with thefollowing command:
[student@w8ks-node-0] $ |sudo -i

Answer:

Explanation:
See the solution below.
Explanation
solution


 

NEW QUESTION 49
For this item, you will havetosshto the nodesik8s-master-0andik8s-node-0and complete all tasks on thesenodes. Ensure that you return tothe base node (hostname:node-1) when you havecompleted this item.
Context
As an administrator of a smalldevelopment team, you have beenasked to set up a Kubernetes clusterto test the viability of a newapplication.
Task
You must usekubeadmto performthis task. Anykubeadminvocationswill require the use of the
--ignore-preflight-errors=alloption.
* Configure thenodeik8s-master-Oas a masternode. .
* Join the nodeik8s-node-otothe cluster.

Answer:

Explanation:
See the solution below.
Explanation
solution
You must use thekubeadmconfiguration file located at when initializingyour cluster.
You may use any CNI pluginto complete this task, but ifyou don't have your favouriteCNI plugin's manifest URL athand, Calico is one popularoption:https://docs.projectcalico.org/v3.14/manifests/calico.yaml Docker is already installedon both nodes and hasbeen configured so that you caninstall the required tools.

 

NEW QUESTION 50
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 51
Annotate the pod with name=webapp

  • A. kubectl annotate pod nginx-dev-pod name=webapp
    kubectl annotate pod nginx-prod-pod name=webapp
    // Verify
    kubectl describe po nginx-dev-pod | grep -i annotations
    kubectl describe po nginx-prod-pod | grep -i annotations
  • B. kubectl annotate pod nginx-dev-pod name=webapp
    kubectl annotate pod nginx-prod-pod name=webapp
    // Verify
    kubectl describe po nginx-dev-pod | grep -i annotations

Answer: A

 

NEW QUESTION 52
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 53
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 54
On the NGFW, how can you generate and block a private key from export and thus harden your security posture and prevent rogue administrators or other bad actors from misusing keys?

  • A. 1) Select Device > Certificates
    2) Select Certificate Profile.
    3) Generate the certificate
    4) Select Block Private Key Export.
  • B. 1) Select Device > Certificate Management > Certificates Device > Certificates
    2) Generate the certificate.
    3) Select Block Private Key Export.
    4) Click Generate to generate the new certificate.
  • C. 1) Select Device > Certificate Management > Certificates >Device > Certificates
    2) Import the certificate.
    3) Select Import Private Key
    4) Click Generate to generate the new certificate.
  • D. 1) Select Device > Certificates
    2) Select Certificate Profile
    3) Generate the certificate
    4) Select Block Private Key Export

Answer: D

 

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

Answer:

Explanation:
See the solution below.
Explanation
Kubectl logs frontend | grep -i "started" > /opt/error-logs

 

NEW QUESTION 56
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 57
Create a deployment spec file that will:
Launch 7 replicas of the nginx Image with the labelapp_runtime_stage=dev deployment name: kual00201 Save a copy of this spec file to /opt/KUAL00201/spec_deployment.yaml (or /opt/KUAL00201/spec_deployment.json).
When you are done, clean up (delete) any new Kubernetes API object that you produced during this task.

Answer:

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

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

 

NEW QUESTION 58
Score:7%

Context
An existing Pod needs to be integrated into the Kubernetes built-in logging architecture (e. g. kubectl logs).
Adding a streaming sidecar container is a good and common way to accomplish this requirement.
Task
Add a sidecar container named sidecar, using the busybox Image, to the existing Pod big-corp-app. The new sidecar container has to run the following command:
/bin/sh -c tail -n+1 -f /va r/log/big-corp-app.log
Use a Volume, mounted at /var/log, to make the log file big-corp-app.log available to the sidecar container.

Answer:

Explanation:
See the solution below.
Explanation
Solution:
#
kubectl get pod big-corp-app -o yaml
#
apiVersion: v1
kind: Pod
metadata:
name: big-corp-app
spec:
containers:
- name: big-corp-app
image: busybox
args:
- /bin/sh
- -c
- >
i=0;
while true;
do
echo "$(date) INFO $i" >> /var/log/big-corp-app.log;
i=$((i+1));
sleep 1;
done
volumeMounts:
- name: logs
mountPath: /var/log
- name: count-log-1
image: busybox
args: [/bin/sh, -c, 'tail -n+1 -f /var/log/big-corp-app.log']
volumeMounts:
- name: logs
mountPath: /var/log
volumes:
- name: logs
emptyDir: {
}
#
kubectl logs big-corp-app -c count-log-1

 

NEW QUESTION 59
......


How to Prepare For Linux Foundation-CKA: Certified Kubernetes Administrator Exam

Preparation Guide for Linux Foundation-CKA: Certified Kubernetes Administrator Exam

Introduction

This certification is for Kubernetes administrators, cloud administrators and other IT professionals who manage Kubernetes instances. A certified K8s administrator has demonstrated the ability to do basic installation as well as configuring and managing production-grade Kubernetes clusters. They will have an understanding of key concepts such as Kubernetes networking, storage, security, maintenance, logging and monitoring, application lifecycle, troubleshooting, API object primitives and the ability to establish basic use-cases for end users. This learning path is intended specifically for Kubernetes cluster administrators. Anyone interested in learning how to work with Kubernetes will also benefit from this CNCF CKA practice exams and CNCF CKA practice test.

Responsibilities of a Kubernetes administrator involve designing and implementing solutions to leverage a Kubernetes cluster, configuring hardware, peripherals, and services, managing settings and storage, deploying cloud-native applications, and monitoring and supporting a Kubernetes environment. You also undertake duties like researching opportunities for automation, troubleshooting issues as reported by users, and mentoring junior team members in best practices. You often collaborate with other members of the IT team using tools like GIT to promote security, efficiency, and scalability of core services and capabilities.

Kubernetes is one of the world’s most popular container orchestration tools. Established by the Cloud Native Computing Foundation (CNCF), the Kubernetes Administrator certification is designed to validate your skills for working with Kubernetes. This learning path is designed to help you prepare you for the CKA exam. It includes a combination of courses covering each exam domain, a series of labs to build hands-on Kubernetes experience working directly in a live cloud environment, and exams to test your knowledge along the way.

A Kubernetes Adminstrator requires strong experience with Windows, Linux, or Unix system administration, as well as solid skills with orchestration platforms, such as ECS, Kubernetes, or Mesos. Knowledge of SQL databases and basic coding skills in Java, JavaScript, PHP, or a similar language are all desirable, as is experience with microservices architectures. Many positions require a bachelor’s degree in computer science, networking, or a related field. This exam to become a Certified Kubernetes Administrator (CKA) will enhance your qualifications and expand your income potential.

 

Best updated resource for CKA Online Practice Exam: https://www.dumpstests.com/CKA-latest-test-dumps.html

Realistic Practice CKA Certified Kubernetes Administrator (CKA) Program Exam Exam Braindumps: https://drive.google.com/open?id=1bxEy-n-CBRBk9L164F-DcJwY1KJ-wYvZ