[Q32-Q54] CKA Certification Exam Dumps Questions in here [Jan-2022]

Share

CKA Certification Exam Dumps Questions in here [Jan-2022]

Updated CKA Exam Practice Test Questions


Linux Foundation CKA Exam Syllabus Topics:

TopicDetails
Topic 1
  • Manage role based access control (RBAC)
  • Know how to scale applications
  • Understand the primitives used to create robust
Topic 2
  • Understand ClusterIP, NodePort, LoadBalancer service types and endpoints
  • Understand persistent volume claims primitive
Topic 3
  • Know how to use Ingress controllers and Ingress resources
  • Understand how to monitor applications
Topic 4
  • Awareness of manifest management and common templating tools
  • Understand storage classes, persistent volumes
Topic 5
  • Understand deployments and how to perform rolling update and rollbacks
  • Manage a highly-available Kubernetes cluster
Topic 6
  • Know how to configure and use CoreDNS
  • Troubleshoot cluster component failure
  • Implement etcd backup and restore
Topic 7
  • Understand how resource limits can affect Pod scheduling
  • Use ConfigMaps and Secrets to configure applications
Topic 8
  • Perform a version upgrade on a Kubernetes cluster using Kubeadm
  • Understand volume mode, access modes and reclaim policies for volumes


Linux Foundation-CKA: Certified Kubernetes Administrator Exam Experience

  • CNCF CKA dumps pdf has a lot of mock exams which will help you and give you a very clear understanding of Kubernetes. We recommend 2-3 practice attempts of each mock exam.
  • You must have good hands-on Linux command line environment,since you will be dealing with files to edit, delete, save and so on.
  • CNCF CKA practice test is a very refined and detailed test. This dump has all the minute details about Kubernetes if you are learning from scratch about the orchestrator.
  • Kubernetes documentation is extremely vast. It is very important to traverse through the documentation couple of times to get hold of it as you have access to Kubernetes documentation during the exam.

 

NEW QUESTION 32
Make the node schedulable by uncordon the node

Answer:

Explanation:
kubectl uncordon node-1 //verify kubectl get no

 

NEW QUESTION 33
List all configmap and secrets in the cluster in all namespace and write it to a file /opt/configmap-secret

Answer:

Explanation:
kubectl get configmap,secrets --all-namespaces > /opt/configmap-secret // Verify Cat /opt/configmap-secret

 

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


 

NEW QUESTION 35
Create a file called "config.txt" with two values key1=value1
and key2=value2. Then create a configmap named "keyvalcfgmap" andread data from the file "config.txt" and verify that configmap is created correctly

  • A. cat >> config.txt << EOF
    key1=value1
    key2=value2
    EOF
    kubectl create cm keyvalcfgmap --from-file=config.txt
    //Verify
    kubectl get cm keyvalcfgmap -o yaml
  • B. cat >> config.txt << EOF
    key1=value1
    key2=value2
    EOF
    cat config.txt
    // Create configmap from "config.txt" file
    kubectl create cm keyvalcfgmap --from-file=config.txt
    //Verify
    kubectl get cm keyvalcfgmap -o yaml

Answer: B

 

NEW QUESTION 36
Create a nginx pod that will be deployed to node with the label
"gpu=true"

  • A. kubectl run nginx --image=nginx --restart=Always --dry-run -o
    yaml > nodeselector-pod.yaml
    // add the nodeSelector like below and create the pod
    kubectl apply -f nodeselector-pod.yaml
    vim nodeselector-pod.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: nginx
    spec:
    nodeSelector:
    gpu: true
    containers:
    - image: nginx
    name: nginx
    restartPolicy: Always
    kubectl apply -f nodeselector-pod.yaml
    //Verify
    kubectl get no -show-labels
    kubectl get po
    kubectl describe po nginx | grep Node-Selectors
  • B. kubectl run nginx --image=nginx --restart=Always --dry-run -o
    yaml > nodeselector-pod.yaml
    // add the nodeSelector like below and create the pod
    kubectl apply -f nodeselector-pod.yaml
    vim nodeselector-pod.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: nginx
    spec:
    nodeSelector:
    gpu: true
    yaml
    //Verify
    kubectl get no -show-labels
    kubectl get po
    kubectl describe po nginx | grep Node-Selectors

Answer: A

 

NEW QUESTION 37
List all the pods sorted by created timestamp

Answer:

Explanation:
kubect1 get pods--sort-by=.metadata.creationTimestamp

 

NEW QUESTION 38
List all the pods sorted by created timestamp

Answer:

Explanation:
See the solution below.
Explanation
kubect1 get pods--sort-by=.metadata.creationTimestamp

 

NEW QUESTION 39
Get list of all the nodes with labels

Answer:

Explanation:
kubectl get nodes --show-labels

 

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

  • A. 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
  • B. 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: B

 

NEW QUESTION 41
Create a snapshot of the etcd instance running at https://127.0.0.1:2379, saving the snapshot to the file path
/srv/data/etcd-snapshot.db.
The following TLS certificates/key are supplied for connecting to the server with etcdctl:
CA certificate: /opt/KUCM00302/ca.crt
Client certificate: /opt/KUCM00302/etcd-client.crt
Client key: Topt/KUCM00302/etcd-client.key

Answer:

Explanation:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\18 C.JPG

 

NEW QUESTION 42
Check the history of deployment

Answer:

Explanation:
kubectl rollout history deployment webapp

 

NEW QUESTION 43
Create an nginx pod with containerPort 80 and with a PersistentVolumeClaim "task-pv-claim" and has a mouth path "/usr/share/nginx/html"

  • A. vim nginx-pvc-pod.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: task-pv-pod
    spec:
    volumes:
    - name: task-pv-storage
    persistentVolumeClaim:
    claimName: task-pv-claim
    containers:
    - name: task-pv-container
    image: nginx
    ports:
    - containerPort: 80
    name: "http"
    volumeMounts:
    - mountPath: "/usr/share/nginx/html"
    name: task-pv-storage
    kubectl apply -f nginx-pvc-pod.yaml
    // Verify
    kubectl describe po "POD-Name" | grep -i volumes -A5
    Volumes:
    task-pv-storage:
    Type: PersistentVolumeClaim (a reference to a
    PersistentVolumeClaim in the same namespace)
    ClaimName: task-pv-claim
    ReadOnly: false
  • B. vim nginx-pvc-pod.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: task-pv-pod
    spec:
    volumes:
    - name: task-pv-storage
    persistentVolumeClaim:
    claimName: task-pv-claim
    containers:
    - name: task-pv-container
    image: nginx
    ports:
    - containerPort: 60
    name: "http"
    volumeMounts:
    - mountPath: "/usr/share/nginx/html"
    name: task-pv-storage
    kubectl apply -f nginx-pvc-pod.yaml
    // Verify
    kubectl describe po "POD-Name" | grep -i volumes -A4
    Volumes:
    task-pv-storage:
    Type: PersistentVolumeClaim (a reference to a
    PersistentVolumeClaim in the same namespace)
    ClaimName: task-pv-claim
    ReadOnly: false

Answer: A

 

NEW QUESTION 44
Create a pod with environment variables as var1=value1.Check the environment variable in pod

  • A. kubectl run nginx --image=nginx --restart=Never --env=var1=value1
    # then
    kubectl exec -it nginx -- env
    # or
    kubectl exec -it nginx -- sh -c 'echo $var1'
    # or
    kubectl describe po nginx | grep value1
  • B. kubectl run nginx --image=nginx --restart=Never --env=var1=value1
    # then
    kubectl exec -it nginx -- env
    # or
    kubectl describe po nginx | grep value1

Answer: A

 

NEW QUESTION 45
Get list of PVs and order by size and write to file "/opt/pvstorage.txt"

Answer:

Explanation:
kubectl get pv --sort-by=.spec.capacity.storage > /opt/pv storage.txt

 

NEW QUESTION 46
List the nginx pod with custom columns POD_NAME and POD_STATUS

Answer:

Explanation:
See the solution below.
Explanation
kubectl get po -o=custom-columns="POD_NAME:.metadata.name,
POD_STATUS:.status.containerStatuses[].state"

 

NEW QUESTION 47
Check nodes which are ready and print it to a file /opt/nodestatus

  • A. JSONPATH='{range .items[*]}{@.metadata.name}:{range
    @.status.conditions[*]}{@.type}={@.status};{end}{end}' \
    && kubectl get nodes -o jsonpath="$JSONPATH" | grep
    "Ready=True" > /opt/node-status
    //Verify
    cat /opt/node-status
  • B. JSONPATH='{range .items[*]}{@.metadata.name}:{range
    @.status.conditions[*]}{@.type}={@.status};{end}{end}' \
    //Verify
    cat /opt/node-status

Answer: A

 

NEW QUESTION 48
List all persistent volumes sorted bycapacity, saving the fullkubectloutput to
/opt/KUCC00102/volume_list. Usekubectl 's own functionality forsorting the output, and do not manipulate it any further.

Answer:

Explanation:
See the solution below.
Explanation
solution

 

NEW QUESTION 49
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 50
Score: 7%

Task
Reconfigure the existing deployment front-end and add a port specification named http exposing port 80/tcp of the existing container nginx.
Create a new service named front-end-svc exposing the container port http.
Configure the new service to also expose the individual Pods via a NodePort on the nodes on which they are scheduled.

Answer:

Explanation:
See the solution below.
Explanation
Solution:
kubectl get deploy front-end
kubectl edit deploy front-end -o yaml
#port specification named http
#service.yaml
apiVersion: v1
kind: Service
metadata:
name: front-end-svc
labels:
app: nginx
spec:
ports:
- port: 80
protocol: tcp
name: http
selector:
app: nginx
type: NodePort
# kubectl create -f service.yaml
# kubectl get svc
# port specification named http
kubectl expose deployment front-end --name=front-end-svc --port=80 --tarport=80 --type=NodePort

 

NEW QUESTION 51
Get list of PVs and order by size and write to file - /opt/pvlist.txt

Answer:

Explanation:
kubectl get pv --sort-by=.spec.capacity.storage > /opt/pvlist.txt

 

NEW QUESTION 52
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 53
List all the events sorted by timestamp and put them into file.log and verify

  • A. kubectl get events --sort-by=.metadata.creationTimestamp
    // putting them into file.log
    kubectl get events --sort-by=.metadata.creationTimestamp >
    test-file.log
    cat test-file.log
  • B. kubectl get events --sort-by=.metadata.creationTimestamp
    kubectl get events --sort-by=.metadata.creationTimestamp >
    test-file.log
    cat test-file.log
  • C. kubectl get events --sort-by=.metadata.creationTimestamp
    // putting them into file.log
    kubectl get events --sort-by=.metadata.creationTimestamp >
    cat test-file.log

Answer: A

 

NEW QUESTION 54
......


Understanding of functional and technical aspects of Cluster Architecture, Installation & Configuration

You will create a Kubernetes cluster that adheres to best practices from scratch using the kubeadm cluster bootstrapping utility. You will also perform several cluster management tasks including performing a backup the cluster, restoring the cluster from a backup, and upgrading Kubernetes in this Lab. You will also learn how to perform tests to verify that everything works as you expect. Even if you intend to use fully-managed Kubernetes clusters, this Lab provides you with a deeper understanding of Kubernetes clusters, and helps you decide on the cluster configuration that is best for your requirements.

The following will be discussed in CNCF CKA dumps:

  • Manage role based access control (RBAC)
  • Perform a version upgrade on a Kubernetes cluster using Kubeadm
  • Use Kubeadm to install a basic cluster
  • Implement etcd backup and restore

 

Pass Kubernetes Administrator CKA Exam With  63 Questions: https://whizlabs.actual4dump.com/Linux-Foundation/CKA-actualtests-dumps.html