This page was exported from Top Exam Collection [ http://blog.topexamcollection.com ] Export date:Mon Jan 20 13:56:06 2025 / +0000 GMT ___________________________________________________ Title: [Q18-Q36] Pass Your CKA Exam Easily With 100% Exam Passing Guarantee [2023] --------------------------------------------------- Pass Your CKA Exam Easily With 100% Exam Passing Guarantee [2023] CKA Dumps are Available for Instant Access from TopExamCollection The CKA program is designed for professionals who want to demonstrate their expertise in Kubernetes administration. Certified Kubernetes Administrator (CKA) Program Exam certification is suitable for IT professionals, cloud architects, DevOps engineers, and system administrators who work with Kubernetes. The CKA program provides a rigorous testing process that ensures that certified professionals have the skills and knowledge to work with Kubernetes in real-world scenarios.   NO.18 Apply the autoscaling to this deployment with minimum 10 and maximum 20 replicas and target CPU of 85% and verify hpa is created and replicas are increased to 10 from 1 kubectl autoscale deploy webapp –min=10 –max=20 –cpu percent=85 kubectl get hpa kubectl get pod -l app=webappNO.19 Create a pod as follows:* Name:non-persistent-redis* container Image:redis* Volume with name:cache-control* Mount path:/data/redisThe pod should launch in thestagingnamespace and the volumemust notbe persistent. See the solution below.ExplanationsolutionNO.20 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.ContextAs an administrator of a smalldevelopment team, you have beenasked to set up a Kubernetes clusterto test the viability of a newapplication.TaskYou 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. See the solution below.ExplanationsolutionYou 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.NO.21 Create a busybox pod and add “sleep 3600” command See the solution below.Explanationkubectl run busybox –image=busybox –restart=Never — /bin/sh -c“sleep 3600”NO.22 Ensure a single instance of pod nginx is running on each node of the Kubernetes cluster where nginx also represents the Image name which has to be used. Do not override any taints currently in place.Use DaemonSet to complete this task and use ds-kusc00201 as DaemonSet name. solutionNO.23 What are the differences between using a service versus using an application for Security Policy match?  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  Use of a “service” enables the firewall to take action after enough packets allow for App-ID identification  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  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. NO.24 Create a NetworkPolicy which denies all ingress traffic  apiVersion: networking.k8s.io/v1kind: NetworkPolicymetadata:name: default-denyspec:podSelector: {}policyTypes:– Ingress  apiVersion: networking.k8s.io/v1kind: NetworkPolicymetadata:name: default-denyspec:podSelector: ()policyTypes:– Ingress NO.25 Score: 5%TaskMonitor the logs of pod bar and:* Extract log lines corresponding to error* Write them to /opt/KUTR00101/bar See the solution below.ExplanationSolution:kubectl logs bar | grep ‘unable-to-access-website’ > /opt/KUTR00101/bar cat /opt/KUTR00101/barNO.26 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.You can ssh to the failed node using:[student@node-1] $ | ssh Wk8s-node-0You can assume elevated privileges on the node with the following command:[student@w8ks-node-0] $ | sudo -i See the solution below.ExplanationsolutionNO.27 Score: 4%TaskCreate a persistent volume with name app-data , of capacity 1Gi and access mode ReadOnlyMany. The type of volume is hostPath and its location is /srv/app-data . Solution:#vi pv.yamlapiVersion: v1kind: PersistentVolumemetadata:name: app-configspec:capacity:storage: 1GiaccessModes:– ReadOnlyManyhostPath:path: /srv/app-config#kubectl create -f pv.yamlNO.28 Create a namespace called ‘development’ and a pod with image nginx called nginx on this namespace. kubectl create namespace development kubectl run nginx –image=nginx –restart=Never -n developmentNO.29 Create a pod that echo “hello world” and then exists. Have the pod deleted automatically when it’s completed kubectl run busybox –image=busybox -it –rm –restart=Never — /bin/sh -c ‘echo hello world’ kubectl get po # You shouldn’t see pod with the name “busybox”NO.30 Change the label for one of the pod to env=uat and list all the pods to verify kubectl label pod/nginx-dev3 env=uat –overwrite kubectl get pods –show-labelsNO.31 Create a deployment spec file thatwill:* Launch 7 replicas of thenginxImage with the labelapp_runtime_stage=dev* deployment name:kual00201Save 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 thatyou produced during this task. See the solution below.ExplanationsolutionNO.32 Deploy a pod with image=redis on a node with label disktype=ssd  // Get list of nodeskubectl get nodes//Get node with the label disktype=ssdkubectl get no -l disktype=ssd// Create a sample yaml filekubectl run node-redis –generator=run-pod/v1 –image=redis –dryrun -o yaml > test-redis.yaml// Edit test-redis.yaml file and add nodeSelectorvim test-redis.yamlapiVersion: v1kind: Podmetadata:name: redisspec:nodeSelector:disktype: ssdcontainers:– name: node-redisimage: redisimagePullPolicy: IfNotPresentkubectl apply -f test-redis.yaml/ // VerifyK kubectl get po -o wide  // Get list of nodeskubectl get nodes//Get node with the label disktype=ssdkubectl get no -l disktype=ssd// Create a sample yaml filekubectl run node-redis –generator=run-pod/v1 –image=redis –dryrun -o yaml > test-redis.yaml// Edit test-redis.yaml file and add nodeSelectorvim test-redis.yamlapiVersion: v1– name: node-redisimage: redisimagePullPolicy: IfNotPresentkubectl apply -f test-redis.yaml/ // VerifyK kubectl get po -o wide NO.33 Create a redis pod and mount “redis-config” as “redis.conf”inside redis container, name the config volume as “redis-volume”redis-config path – /opt/redis-config  1  2  Pending NO.34 Create 2 nginx image pods in which one of them is labelled with env=prod and another one labelled with env=dev and verify the same. kubectl run –generator=run-pod/v1 –image=nginx — labels=env=prod nginx-prod –dry-run -o yaml > nginx-prodpod.yaml Now, edit nginx-prod-pod.yaml file and remove entries like “creationTimestamp: null” “dnsPolicy: ClusterFirst” vim nginx-prod-pod.yaml apiVersion: v1 kind: Pod metadata:labels:env: prodname: nginx-prodspec:containers:– image: nginxname: nginx-prodrestartPolicy: Always# kubectl create -f nginx-prod-pod.yamlkubectl run –generator=run-pod/v1 –image=nginx —labels=env=dev nginx-dev –dry-run -o yaml > nginx-dev-pod.yamlapiVersion: v1kind: Podmetadata:labels:env: devname: nginx-devspec:containers:– image: nginxname: nginx-devrestartPolicy: Always# kubectl create -f nginx-prod-dev.yamlVerify :kubectl get po –show-labelskubectl get po -l env=prodkubectl get po -l env=devNO.35 Create 2 nginx image pods in which one of them is labelled with env=prod and another one labelled with env=dev and verify the same.  kubectl run –generator=run-pod/v1 –image=nginx — labels=env=prod nginx-prod –dry-run -o yaml > nginx-prodpod.yaml Now, edit nginx-prod-pod.yaml file and remove entries like “creationTimestamp: null” “dnsPolicy: ClusterFirst” vim nginx-prod-pod.yaml apiVersion: v1 kind: Pod metadata:labels:env: prodname: nginx-prodspec:containers:– image: nginxname: nginx-prodrestartPolicy: Always# kubectl create -f nginx-prod-pod.yamlkubectl run –generator=run-pod/v1 –image=nginx —labels=env=dev nginx-dev –dry-run -o yaml > nginx-dev-pod.yamlapiVersion: v1kind: Podmetadata:labels:env: devname: nginx-devspec:containers:– image: nginxname: nginx-devrestartPolicy: Always# kubectl create -f nginx-prod-dev.yamlVerify :kubectl get po –show-labelskubectl get po -l env=prodkubectl get po -l env=dev  kubectl run –generator=run-pod/v1 –image=nginx — labels=env=prod nginx-prod –dry-run -o yaml > nginx-prodpod.yaml Now, edit nginx-prod-pod.yaml file and remove entries like “creationTimestamp: null” “dnsPolicy: ClusterFirst” vim nginx-prod-pod.yaml apiVersion: v1 kind: Pod metadata:labels:env: prodname: nginx-prodspec:containers:– image: nginxname: nginx-prodrestartPolicy: Always# kubectl create -f nginx-prod-pod.yamlkubectl run –generator=run-pod/v1 –image=nginx —labels=env=dev nginx-dev –dry-run -o yaml > nginx-dev-pod.yamlapiVersion: v1kind: Podmetadata:– image: nginxname: nginx-devrestartPolicy: Always# kubectl create -f nginx-prod-dev.yamlVerify :kubectl get po –show-labelskubectl get po -l env=dev NO.36 Check to see how many worker nodes are ready (not including nodes tainted NoSchedule) and write the number to /opt/KUCC00104/kucc00104.txt. solution Loading … Study resources for the Valid CKA Braindumps: https://www.topexamcollection.com/CKA-vce-collection.html --------------------------------------------------- Images: https://blog.topexamcollection.com/wp-content/plugins/watu/loading.gif https://blog.topexamcollection.com/wp-content/plugins/watu/loading.gif --------------------------------------------------- --------------------------------------------------- Post date: 2023-09-06 10:37:52 Post date GMT: 2023-09-06 10:37:52 Post modified date: 2023-09-06 10:37:52 Post modified date GMT: 2023-09-06 10:37:52