[May 09, 2026] CKA Dumps PDF and Test Engine Exam Questions - GuideTorrent
Verified CKA exam dumps Q&As with Correct 85 Questions and Answers
The CKA program is highly respected in the industry and is recognized by many employers as a standard for Kubernetes expertise. It is a valuable certification for IT professionals who want to demonstrate their skills and knowledge in managing Kubernetes clusters. CKA exam is available online and can be taken remotely, making it accessible to IT professionals around the world.
NEW QUESTION # 50
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 # 51
Create a pod as follows:
Name: mongo
Using Image: mongo
In a new Kubernetes namespace named: my-website
Answer:
Explanation:
solution
NEW QUESTION # 52
Set the node named ek8s-node-1 as unavailable and reschedule all the pods running on it.
Answer:
Explanation:
NEW QUESTION # 53
Check the history of deployment
Answer:
Explanation:
kubectl rollout history deployment webapp
NEW QUESTION # 54
You are running a MySQL database on a Kubernetes cluster. You want to ensure that your database data is persistent even if a pod is deleted or restarted. You need to create a PersistentVolumeClaim (PVC) to request a specific storage class with a 1 OGB capacity, access mode of 'ReadWriteOnce', and storage class of 'fast-storage'. Explain the configuration and how to create the PVC and then use the PVC to create a StatefulSet for your MySQL deployment.
Answer:
Explanation:
See the solution below with Step by Step Explanation.
Explanation:
Solution (Step by Step) :
1. Create a PersistentVolumeClaim:
- Create a YAML file named 'mysql-pvc.yaml' with the following content:
- Apply the YAML file using 'kubectl apply -f mysql-pvc.yamP. 2. Create a StatefulSet for MySQL Deployment: - Create a YAML file named 'mysql-statefulset.yaml' with the following content:
- Apply the YAML file using 'kubectl apply -f mysql-statefulset.yaml'. 3. Verify Deployment: - Check the status of the StatefulSet using 'kubectl get statefulsets mysql'. - Ensure that the pod is running and the PVC is mounted correctly. You can use 'kubectl describe pod mysql-0' to see the details of the pod and the mounted PVC.
NEW QUESTION # 55
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:


NEW QUESTION # 56
A recent deployment of a new version of your application caused a large number of pods to enter a 'CrashLoopBackOff state. You need to identify the root cause of the issue and resolve it.
Answer:
Explanation:
See the solution below with Step by Step Explanation.
Explanation:
Solution (Step by Step) :
1. Identify the Failing Pods:
- Use 'kubectl get pods -l app=' to list the pods in the Deployment.
- Identify the pods that are in the 'CrashLoopBackOff state.
2. Examine Pod Logs:
- Use 'kubectl logs -f to view the logs of the failing pods.
- Look for error messages, stack traces, or other clues that can point to the root cause of the crash.
- For example, errors related to:
- Missing dependencies or configuration: Check if the application is missing required configuration files or dependencies.
- Incorrect resource usage: Look for errors related to memory or CPU limitations.
- Network connectivity issues: Check for errors related to communication failures.
3. Check for Recent Changes:
- Review the changes made during the deployment:
- Analyze the updated deployment YAML file to identify any configuration changes that might have introduced the crash.
- Check for changes in container images, resource requests, or other settings.
4. Inspect Deployment Events:
- Use "kubectl describe pod ' to view the pod's events:
- Look for events related to the crash, such as "Back-off restarting failed container" or "Container restarting".
- The events might provide insights into the timing of the crashes and the potential reasons.
5. Verify Network Connectivity:
- Test network connectivity from within the failing pods:
- Use "kubectl exec -it -n bash' to enter a pod.
- Run 'ping or 'curl to test network connectivity to external resources.
6. Troubleshoot the Application Code:
- If the logs suggest a problem with the application code:
- Debug the application code: Analyze the code to find the source of the crashes.
- Consider rolling back the deployment to the previous version: Use 'kubectl rollout undo deployment ' to revert to the previous working version.
7. Address the Root Cause:
- Once you identify the root cause:
- Fix the underlying issue in the application code or deployment configuration.
- Apply the fixes: Update the deployment YAML file with the corrected configuration.
- Redeploy the application: Use "kubectl apply -f to redeploy the application with the fix.
NEW QUESTION # 57
Install a kubernetes cluster with one master and one worker using kubeadm
- A. This is a straightforward question, you need to install kubernetes cluster using kubeadm with one master and one worker.
Refer : https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/ - B. This is a straightforward question, you need to install kubernetes cluster using kubeadm with one master and one worker.
Installation is considered success once both master and worker
nodes become available.
Refer : https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/
Answer: B
NEW QUESTION # 58
You are setting up a new Kubernetes cluster with a highly sensitive application that requires access control at the pod level. Explain how you can use NetworkPolicy to restrict access to pods within your cluster.
Answer:
Explanation:
See the solution below with Step by Step Explanation.
Explanation:
Solution (Step by Step) :
1 . Create a NetworkPolicy Resource: Define a 'NetworkPolicy' resource using a YAML file. The
'NetworkPolicy' resource will contain the rules for network traffic access to the pods. You can use 'kubectl create -f networkpolicy.yaml' to create the NetworkPolicy resource.
2. Set 'podSelectoo: Use the podSelector' field to identify the pods that will be affected by the policy. In this example, we are targeting pods with the label 'app: sensitive-app'. 3. Define 'ingress' and 'egress' Rules: Use the 'ingress' and 'egress' sections to define the rules for incoming and outgoing traffic. 'ingress': This section specifies which pods or services are allowed to send traffic to the pods targeted by the 'NetworkPolicy'. Here, we are allowing traffic from pods labeled app: trusted-service'. 'egress': This section specifies which destinations the pods targeted by the NetworkPolicy are allowed to send traffic to. In this example, we are allowing egress traffic to the IP address range 10.0.0.0/16. 4. Implement the "NetworkPolicy': Apply the YAML file using 'kubectl apply -f networkpolicy.yaml'. Once applied, the NetworkPolicy will be enforced, blocking any traffic that does not meet the specified rules.
NEW QUESTION # 59
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 # 60
You have a Kubernetes cluster with two namespaces: 'dev' and 'prod'. You want to configure RBAC to allow developers in the 'dev' namespace to create deployments and pods, but only allow operations personnel in the 'prod' namespace to delete deployments and pods.
Answer:
Explanation:
See the solution below with Step by Step Explanation.
Explanation:
Create two RBAC roles and two role bindings to implement this configuration.
Solution (Step by Step) :
Step 1: Create a Role for Developers in the 'dev' namespace.
Step 2: Create a Role Binding for Developers in the 'dev' namespace.
Step 3: Create a Role for Operations Personnel in the 'prod' namespace.
Step 4: Create a Role Binding for Operations Personnel in the 'prod' namespace.
We define separate roles for developers and operations personnel, each with specific permissions in their respective namespaces. The roles specify which resources ('deployments', 'pods') can be accessed and which verbs ('create', 'delete', 'get') are allowed. Role bindings connect the roles to users, granting them the specified permissions. Applying the configurations: Use 'kubectl apply -f [filename].yaml' to apply the role and role binding YAML files. You can replace 'developer' and with actual user names or service account names.
NEW QUESTION # 61
Set CPU and memory requests and limits for existing pod name
"nginx-prod".
Set requests for CPU and Memory as 100m and 256Mi respectively
Set limits for CPU and Memory as 200m and 512Mi respectively
- A. kubectl get po
kubectl set resources po nginx-prod --
limits=cpu=200m,memory=512Mi --requests=cpu=100m,memory=256Mi
//Verify
kubectl describe po nginx-prod - B. kubectl get po
kubectl set resources po nginx-prod --
limits=cpu=200m,memory=512Mi --requests=cpu=100m,memory=256Mi
//Verify
kubectl top po
kubectl describe po nginx-prod
Answer: B
NEW QUESTION # 62
Task Weight: 4%
Task
Schedule a Pod as follows:
* Name: kucc1
* App Containers: 2
* Container Name/Images:
o nginx
o consul
Answer:
Explanation:
Solution:


NEW QUESTION # 63
You have a Kubernetes cluster with a variety of namespaces: 'default', 'development', 'production', and 'testing'. You need to implement granular role-based access control (RBAC) to ensure that:
- Developers in the 'development' namespace can only create and delete pods within that namespace.
- Developers in the 'testing' namespace can only create, delete and scale pods within that namespace.
- Production team members in the 'production' namespace can only view pods and deployments.
Provide the necessary YAML files for the Role, RoleBinding, and ServiceAccount objects to enforce these permissions. Ensure that the service accounts are bound to specific namespaces and that the RoleBindings are correctly defined to grant the necessary access to each group.
Answer:
Explanation:
See the solution below with Step by Step Explanation.
Explanation:
Solution (Step by Step) :
1 . Create a ServiceAccount for Developers in the 'development' namespace:
2. Create a ServiceAccount for Developers in the 'testing' namespace:
3. Create a ServiceAccount for Production Team members in the 'production' namespace:
4. Create a Role for Developers in the 'development' namespace:
5. Create a Role for Developers in the 'testing' namespace:
6. Create a Role for Production Team members in the 'production' namespace:
7. Create a RoleBinding for Developers in the 'development' namespace:
8. Create a RoleBinding for Developers in the 'testing' namespace:
9. Create a RoleBinding for Production Team members in the 'production' namespace:
10. Apply the YAML files using 'kubectl apply -f' ,
NEW QUESTION # 64
Create an nginx pod and set an env value as 'var1=val1'. Check the env value existence within the pod
- A. kubectl run nginx --image=nginx --restart=Never --env=var1=val1
# then
kubectl exec -it nginx -- env
# or
kubectl exec -it nginx -- sh -c 'echo $var1'
# or
kubectl describe po nginx | grep val1
# or
kubectl run nginx --restart=Never --image=nginx --env=var1=val1
-it --rm - env - B. kubectl run nginx --image=nginx --restart=Never --env=var1=val1
# then
kubectl exec -it nginx -- env
# or
kubectl run nginx --restart=Never --image=nginx --env=var1=val1
-it --rm -- env
Answer: A
NEW QUESTION # 65
You are running an application in Kubernetes using a Deployment that defines 3 replicas. You need to perform a rolling update to the Deployment to upgrade the application to a new version. During the update process, you want to ensure that at least 2 replicas are always available, and the maximum number of new pods that can be created at the same time is also limited to 1. How can you configure the Deployment to achieve this rolling update strategy?
Answer:
Explanation:
See the solution below with Step by Step Explanation.
Explanation:
Solution (Step by Step) :
1. Update Deployment YAML:
- Update the 'spec.replicas' field to the desired number of replicas for the new version.
- In the 'spec.strategy.rollingUpdate' section, set the 'maxUnavailable' to 1, meaning that only one pod can be unavailable during the update process.
- Set the maxSurge' to 1, limiting the number of new pods that can be created simultaneously to 1.
2. Apply the Updated Deployment: - Use 'kubectl apply -f deployment.yaml' to apply the changes to your cluster. 3. Monitor the Update Process: - Use 'kubectl get pods -l app=my-app' to monitor the pods. You will see a rolling update in progress: - One old pod will be terminated at a time. - One new pod will be created at a time. - The update will continue until all replicas are updated to the new version. 4. Verify the Update: - Once the update is complete, use 'kubectl describe deployment my-deployment' to check the deployment status. The 'updatedReplicas' field should match the 'replicas' field, indicating that the update was successful. By using 'maxUnavailable' and 'maxSurge' you control the number of unavailable and surge pods during the update process. This ensures a safe and controlled rolling update strategy.,
NEW QUESTION # 66
For this item, you will have to ssh and complete all tasks on these
nodes. Ensure that you return to the base node (hostname: ) 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:
See the solution below.
Explanation
solution
You must use the kubeadm configuration file located at /etc/kubeadm.conf when initializingyour 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 # 67
Create a PersistentVolumeClaim of at least 3Gi storage and access mode ReadWriteOnce and verify status is Bound
- A. vim task-pv-claim.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: task-pv-claim
spec:
storageClassName: ""
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
kubectl apply -f task-pv-claim.yaml
//Verify
kubectl get pv
NAME CAPACITY ACCESS
MODES RECLAIM POLICY STATUS CLAIM
STORAGECLASS REASON AGE
task-pv-volume 5Gi RWO
Retain Bound default/task-pv-claim
6m16s
kubectl get pvc
NAME STATUS VOLUME
CAPACITY ACCESS MODES STORAGECLASS AGE
task-pv-claim Bound task-pv-volume
5Gi RWO 6s - B. vim task-pv-claim.yaml
apiVersion: v2
kind: PersistentVolumeClaim
metadata:
name: task-pv-claim
spec:
storageClassName: ""
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4Gi
kubectl apply -f task-pv-claim.yaml
//Verify
kubectl get pv
NAME CAPACITY ACCESS
MODES RECLAIM POLICY STATUS CLAIM
STORAGECLASS REASON AGE
task-pv-volume 4Gi RWO
Retain Bound default/task-pv-claim
6m16s
kubectl get pvc
NAME STATUS VOLUME
CAPACITY ACCESS MODES STORAGECLASS AGE
task-pv-claim Bound task-pv-volume
5Gi RWO 6s
Answer: A
NEW QUESTION # 68
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 # 69
Perform the following tasks:
* Add an init container tohungry-bear(which has beendefined in spec file
/opt/KUCC00108/pod-spec-KUCC00108.yaml)
* The init container should createan empty file named/workdir/calm.txt
* If/workdir/calm.txtis notdetected, the pod should exit
* Once the spec file has beenupdatedwith the init containerdefinition, the pod should becreated
Answer:
Explanation:
See the solution below.
Explanation
solution


NEW QUESTION # 70
......
Linux Foundation CKA Test Engine PDF - All Free Dumps: https://torrentpdf.guidetorrent.com/CKA-dumps-questions.html