CKA Exam Questions
103 real CKA exam questions with expert-verified answers and explanations. Page 1 of 3.
- Question #1Troubleshooting
Monitor the logs of pod foo and: Extract log lines corresponding to error unable-to-access-website Write them to /opt/KULM00201/foo
kubectl logslog managementlog filteringoutput redirection - Question #1Workloads & Scheduling
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...
DaemonSetTolerationsPod SchedulingWorkload Deployment - Question #2Workloads & Scheduling
Perform the following tasks: Add an init container to hungry-bear (which has been defined in spec file /opt/KUCC00108/pod-spec-KUCC00108.yaml) The init container should create an e...
Init ContainersPod ConfigurationWorkload ManagementYAML Manifests - Question #2Storage
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 ma...
Persistent Volumeskubectl sortingcommand outputstorage capacity - Question #3Workloads and Scheduling
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.
PodsMulti-container podsContainer definitionYAML - Question #4Workloads and Scheduling
Perform the following tasks: Add an init container to hungry-bear (which has been defined in spec file /opt/KUCC00108/pod-spec-KUCC00108.yaml) The init container should create an e...
Init ContainersPodsWorkload DefinitionContainer Lifecycle - Question #4Workloads and Scheduling
Schedule a pod as follows: Name: nginx-kusc00101 Image: nginx Node selector: disk=ssd
Pod creationNode selectorScheduling - Question #5Workloads and Scheduling
Create a deployment as follows: Name: nginx-app Using container nginx with version 1.11.10-alpine The deployment should contain 3 replicas. Next, deploy the application with new ve...
DeploymentRolling UpdateRollbackReplicaSet - Question #6Services and Networking
Create a file: /opt/KUCC00302/kucc00302.txt that lists all pods that implement service baz in namespace development. The format of the file should be one pod name per line.
Kubernetes ServicesPod Selectionkubectl Output FilteringNamespaces - Question #7Workloads and Scheduling
Create a Kubernetes secret as follows: Name: super-secret password: bob Create a pod named pod-secrets-via-file, which mounts a secret named super-secret at /secrets. Create a seco...
Kubernetes SecretsPod ConfigurationVolume MountingEnvironment Variables - Question #7Services & Networking
Create and configure the service front-end-service so it's accessible through NodePort and routes to the existing pod named front-end.
Kubernetes ServiceNodePort ServicePod SelectorService Exposure - Question #8Workloads and Scheduling
Create a pod as follows: Name: mongo Using image: mongo In a new Kubernetes namespace named: my-website
PodsNamespaceskubectlWorkloads - Question #8Storage
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...
PodsVolumesemptyDirNamespaces - Question #9Workloads and Scheduling
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/K...
DeploymentsReplicasPod LabelsResource Lifecycle - Question #9Workloads and Scheduling
Scale the deployment webserver to 6 pods.
DeploymentsScalingPodsWorkload management - Question #10Services & Networking
Create a file: /opt/KUCC0302/kucc0302.txt that lists all pods that implement service baz in namespace development. The format of the file should be one pod name per line.
kubectlservicespodslabel selectors - Question #10Cluster Architecture, Installation & Configuration
Check to see how many worker nodes are ready (not including nodes tainted NoSchedule) and write the number to /opt/KUCC00104/kucc00104.txt.
Node ManagementkubectlTaintsNode Status - Question #11Workloads and Scheduling
Create a Kubernetes secret as follows: Name: super-secret password: bob Create a pod named pod-secrets-via-file, using the redis Image, which mounts a secret named super-secret at...
Kubernetes SecretsPod configurationVolume mountsEnvironment variables - Question #11Workloads and Scheduling
from the pod label name=cpu-utilizer, find pods running high CPU workloads and write the name of the pod consuming most CPU to the file /opt/KUTR00102/KUTR00102.txt (which already...
kubectl topPod LabelsResource MonitoringShell Scripting - Question #12Storage
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 an...
Pod creationemptyDir volumeNamespaceVolume mounts - Question #12Services & Networking
Create a deployment as follows: Name: nginx-random Exposed via a service nginx-random Ensure that the service and pod are accessible via their respective DNS records The container(...
DeploymentServiceKubernetes DNSnslookup - Question #13Cluster Architecture, Installation and Configuration
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 su...
etcdsnapshotbackupTLS - Question #14Cluster Architecture, Installation & Configuration
Check to see how many worker nodes are ready (not including nodes tainted noSchedule) and write the number to /opt/KUCC00104/kucc00104.txt.
Node managementkubectlNode statusTaints - Question #14Workloads & Scheduling
Set the node named ek8s-node-1 as unavailable and reschedule all the pods running on it.
Node drainPod evictionNode maintenanceScheduling - Question #15Troubleshooting
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 t...
Node TroubleshootingKubelet StatusSystemd ConfigurationConfiguration Persistence - Question #16Services & Networking
Create a deployment as follows: Name: nginx-random. Exposed via a service nginx-random. Ensure that the service and pod are accessible via their respective DNS records. The contain...
DeploymentServiceDNSnslookup - Question #16Cluster Architecture, Installation & Configuration
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...
Static PodsKubelet ConfigurationPod ManifestsNode Configuration - Question #17Troubleshooting
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 t...
Node troubleshootingkubeletsystemdNode status - Question #17Cluster Architecture, Installation & Configuration
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) whe...
kubeadmcluster setupmaster nodeworker node - Question #18Troubleshooting
Given a partially-functioning Kubernetes cluster, identify symptoms of failure on the cluster. Determine the cause, the failing service, and take actions to bring up the failed ser...
TroubleshootingCluster HealthService ManagementNetworking - Question #18Cluster Architecture, Installation & Configuration
Configure the kubelet systemd- managed service, on the node with the name=wk8s-node-1, to launch a pod containing a single container of Image httpd named webtool automatically. Any...
Static PodsKubeletNode configurationPod manifests - Question #19Cluster Architecture, Installation & Configuration
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) whe...
kubeadmCluster initializationMaster node setupWorker node join - Question #19Workloads and Scheduling
Create a pod that echo "hello world" and then exists. Have the pod deleted automatically when it's completed
Job creationContainer commandsWorkload lifecycleAutomatic resource cleanup - Question #20Troubleshooting
Given a partially-functioning Kubernetes cluster, identify symptoms of failure on the cluster. Determine the cause, the failing service, and take actions to bring up the failed ser...
Kubernetes TroubleshootingCluster HealthService RestorationPermanent Configuration - Question #20Workloads & Scheduling
Create a pod with environment variables as var1=value1.Check the environment variable in pod
Pod creationEnvironment variablesContainer configurationkubectl exec - Question #21Workloads & Scheduling
Get list of all the pods showing name and namespace with a jsonpath expression.
kubectlpodsjsonpathoutput formatting - Question #22Workloads and Scheduling
Check the image version in pod without the describe command
kubectlpodsimagesjsonpath - Question #23Workloads & Scheduling
List the nginx pod with custom columns POD_NAME and POD_STATUS
kubectl commandspodsoutput formattingcustom columns - Question #24Workloads and Scheduling
List all the pods sorted by name
kubectl commandsPodsResource listingSorting - Question #25Workloads & Scheduling
Create a pod that having 3 containers in it? (Multi-Container)
PodsMulti-containerYAML definitionWorkload deployment - Question #26Workloads and Scheduling
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.
Pod CreationKubernetes LabelsWorkloadskubectl - Question #27Services & Networking
Get IP address of the pod - "nginx-dev"
kubectlPodsNetworkingPod IP - Question #28Workloads and Scheduling
Print pod name and start time to "/opt/pod-status" file
kubectlpodsjsonpathoutput redirection - Question #29Workloads & Scheduling
Check the Image version of nginx-dev pod using jsonpath
kubectljsonpathpodscontainer images - Question #30Workloads and Scheduling
Create a busybox pod and add "sleep 3600" command
Podskubectl runContainer commandsWorkloads - Question #31Workloads and Scheduling
Create an nginx pod and list the pod with different levels of verbosity
Pod managementkubectlResource listingNginx - Question #32Workloads and Scheduling
List all the pods sorted by created timestamp
kubectlpodsresource listingsorting - Question #33Workloads and Scheduling
List all the pods showing name and namespace with a json path expression
kubectlpodsjsonpathdata extraction - Question #34Workloads and Scheduling
List "nginx-dev" and "nginx-prod" pod and delete those pods
Pod managementkubectl commandsResource deletion - Question #34Cluster Architecture, Installation & Configuration
No configuration context change required for this task. Ensure, however, that you have returned to the base node before starting to work on this task: [student@mk8s-master-0] $ exi...
etcdsnapshotbackupcontrol plane