Linux Foundation CKA Practice Test Pdf Exam Material [Q11-Q27]

Share

Linux Foundation CKA Practice Test Pdf Exam Material

CKA Answers CKA Free Demo Are Based On The Real Exam


The CKA program is designed for IT professionals who are interested in Kubernetes administration, including system administrators, DevOps engineers, and cloud administrators. Certified Kubernetes Administrator (CKA) Program Exam certification program covers a wide range of topics, including Kubernetes architecture and components, deploying applications on Kubernetes, configuring Kubernetes networking and security, and troubleshooting Kubernetes clusters.


The CKA exam is a performance-based exam that assesses the candidate’s ability to perform tasks related to Kubernetes. CKA exam is conducted in a real-world, live environment, where the candidate is expected to demonstrate their skills in configuring, deploying, and troubleshooting Kubernetes clusters. CKA exam covers a wide range of topics, including Kubernetes architecture, installation and configuration, networking, storage, security, and troubleshooting. CKA exam is designed to test the candidate’s ability to design, deploy, and manage Kubernetes clusters in a production environment, making it a valuable certification for IT professionals looking to advance their careers in the field of DevOps and cloud-native technologies.

 

NEW QUESTION # 11
Configure the kubelet systemd- managed service, on the node labelled with name=wk8s-node-1, to launch a pod containing a single container of Image httpd named webtool automatically. Any spec files required should be placed in the /etc/kubernetes/manifests directory on the node.
You can ssh to the appropriate node using:
[student@node-1] $ ssh wk8s-node-1
You can assume elevated privileges on the node with the following command:
[student@wk8s-node-1] $ | sudo -i

Answer:

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

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

F:\Work\Data Entry Work\Data Entry\20200827\CKA\21 E.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\21 F.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\21 G.JPG


NEW QUESTION # 12
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 >
    cat test-file.log
  • B. 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
  • C. kubectl get events --sort-by=.metadata.creationTimestamp
    kubectl get events --sort-by=.metadata.creationTimestamp >
    test-file.log
    cat test-file.log

Answer: B


NEW QUESTION # 13
List all persistent volumes sorted by capacity, saving the full kubectl output to
/opt/KUCC00102/volume_list. Use kubectl 's own functionality for sorting the output, and do not manipulate it any further.

Answer:

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


NEW QUESTION # 14
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 # 15
Create the nginx pod with version 1.17.4 and expose it on port 80

Answer:

Explanation:
kubectl run nginx --image=nginx:1.17.4 --restart=Never -- port=80


NEW QUESTION # 16
Create a NetworkPolicy which denies all ingress traffic

  • A. apiVersion: networking.k8s.io/v1
    kind: NetworkPolicy
    metadata:
    name: default-deny
    spec:
    podSelector: ()
    policyTypes:
    - Ingress
  • B. apiVersion: networking.k8s.io/v1
    kind: NetworkPolicy
    metadata:
    name: default-deny
    spec:
    podSelector: {}
    policyTypes:
    - Ingress

Answer: B


NEW QUESTION # 17
Clean the cluster by deleting deployment and hpa you just created

Answer:

Explanation:
kubectl delete deploy webapp kubectl delete hpa webapp


NEW QUESTION # 18
Score: 5%

Task
Monitor the logs of pod bar and:
* Extract log lines corresponding to error file-not-found
* Write them to /opt/KUTR00101/bar

Answer:

Explanation:
Solution:
kubectl logs bar | grep 'unable-to-access-website' > /opt/KUTR00101/bar cat /opt/KUTR00101/bar


NEW QUESTION # 19
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 # 20
For this item, you will have to ssh to the nodes ik8s-master-0 and ik8s-node-0 and complete all tasks on these nodes. Ensure that you return to the base node (hostname: node-1) when you have completed this item.
Context
As an administrator of a small development team, you have been asked to set up a Kubernetes cluster to test the viability of a new application.
Task You must use kubeadm to perform this task. Any kubeadm invocations will require the use of the --ignore-preflight-errors=all option.
Configure the node ik8s-master-O as a master node. .
Join the node ik8s-node-o to the cluster.

Answer:

Explanation:
solution
You must use the kubeadm configuration file located at /etc/kubeadm.conf when initializing your cluster.
You may use any CNI plugin to complete this task, but if you don't have your favourite CNI plugin's manifest URL at hand, Calico is one popular option: https://docs.projectcalico.org/v3.14/manifests/calico.yaml Docker is already installed on both nodes and apt has been configured so that you can install the required tools.


NEW QUESTION # 21
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 # 22
Create and configure the service front-end-service so it's accessible through NodePort and routes to the existing pod named front-end.

Answer:

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


NEW QUESTION # 23
Check the image version in pod without the describe command

Answer:

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


NEW QUESTION # 24
List all service account and create a service account called "admin"

  • A. kubectl get sa
    kubectl get sa --all-namespaces
    //Verify
    kubectl get sa admin -o yaml
  • B. kubectl get sa
    kubectl get sa --all-namespaces
    kubectl create sa admin
    //Verify
    kubectl get sa admin -o yaml

Answer: B


NEW QUESTION # 25
List all persistent volumes sorted by capacity, saving the full kubectl output to /opt/KUCC00102/volume_list. Use kubectl 's own functionality for sorting the output, and do not manipulate it any further.

Answer:

Explanation:
solution


NEW QUESTION # 26
Create a busybox pod that runs the command "env" and save the output to "envpod" file

Answer:

Explanation:
See the solution below.
Explanation
kubectl run busybox --image=busybox --restart=Never --rm -it -- env > envpod.yaml


NEW QUESTION # 27
......

CKA [Aug-2024] Newly Released] Exam Questions For You To Pass: https://www.actualtestsquiz.com/CKA-test-torrent.html

Linux Foundation CKA Exam: Basic Questions With Answers: https://drive.google.com/open?id=1ZbAwvaHBeKK0C8p4C9jm8PVC6fZWZ6oO