CNCF CKA Practice Test Questions and Exam Dumps Part3 Q41-60

View Full CNCF CKA Exam Dumps and Practice Test Dumps

 

Question 41

Which command displays a node’s resource capacity?

  1. kubectl get nodes
  2. kubectl show nodes
  3. kubectl describe node
  4. kubectl inspect node

Correct Answer: 3

Explanation:

kubectl describe node provides detailed information about a node, including its capacity and allocatable resources. The output also contains conditions, labels, taints, allocated resources, and running Pods. This makes the command useful when investigating scheduling failures or resource pressure. A simple kubectl get nodes listing provides basic node information but does not expose the same level of detail. Understanding node capacity is important when determining why a Pod cannot be scheduled or why workloads may be competing for limited resources.

Question 42

Which control-plane component exposes the Kubernetes API?

  1. kube-apiserver
  2. kube-scheduler
  3. kubelet
  4. etcd

Correct Answer: 1

Explanation:

The kube-apiserver is the central interface through which Kubernetes API requests are processed. Administrators and other cluster components communicate with the Kubernetes API through this component. It validates requests, handles authentication and authorization, and interacts with the cluster’s persistent state. The scheduler selects nodes for unscheduled Pods, kubelet manages workloads on individual nodes, and etcd stores cluster data. Understanding the API server is essential when diagnosing control-plane communication or authentication problems.

Question 43

What does a rolling update change in a Deployment?

  1. Cluster DNS settings
  2. Storage backend
  3. Node operating system
  4. Application Pods gradually

Correct Answer: 4

Explanation:

A rolling update gradually replaces existing application Pods with new Pods based on the updated Deployment configuration. This allows a workload to transition between versions without stopping all replicas simultaneously. Kubernetes controls the replacement process according to the Deployment’s update strategy and availability settings. Rolling updates are commonly used when changing container images, configuration, or other Pod template fields. Administrators should monitor the rollout to identify failed replicas or application issues during the transition.

Question 44

Which field specifies the image used by a container?

  1. command
  2. image
  3. ports
  4. volumeMounts

Correct Answer: 2

Explanation:

The image field in a container specification identifies the container image that Kubernetes should use. It can reference an image repository and may include a tag or digest. The command field influences the process executed inside the container, ports describes declared container ports, and volumeMounts defines where volumes are mounted. Correctly specifying the image is fundamental when creating or updating workloads because Kubernetes relies on the image reference to obtain the application container.

Question 45

Which command removes a Kubernetes resource?

  1. kubectl erase
  2. kubectl remove
  3. kubectl delete
  4. kubectl destroy

Correct Answer: 3

Explanation:

kubectl delete is the standard command for removing Kubernetes resources. It can delete individual objects or multiple resources based on names, labels, files, or other selectors. Administrators should understand the consequences before deleting resources because dependent workloads or data may be affected. Some resources may also have finalizers that delay complete deletion until required cleanup occurs. The command is frequently used during troubleshooting, testing, and routine cluster administration.

Question 46

Which object groups Pods using label selectors for network access?

  1. Service
  2. Secret
  3. Job
  4. ConfigMap

Correct Answer: 1

Explanation:

A Service commonly uses a label selector to identify the Pods that should receive network traffic. This creates a stable abstraction over potentially changing Pod IP addresses. When matching Pods are created, deleted, or replaced, the Service’s backend endpoints can change accordingly. Secrets hold sensitive data, Jobs manage finite tasks, and ConfigMaps store configuration information. Understanding Service selectors is especially important when troubleshooting situations where a Service exists but traffic does not reach the expected Pods.

Question 47

What does a Pod’s resource request influence?

  1. Container image selection
  2. Scheduler placement
  3. DNS registration
  4. Secret encryption

Correct Answer: 2

Explanation:

A resource request tells Kubernetes how much CPU or memory a container requires for scheduling purposes. The scheduler considers these requests when determining whether a node has sufficient allocatable resources for the Pod. Requests therefore influence placement decisions but do not represent the maximum amount a container can consume. Limits provide a separate upper boundary. Correct resource requests help Kubernetes make effective scheduling decisions and reduce the likelihood of placing workloads onto nodes without enough available capacity.

Question 48

Which command changes the active namespace for kubectl context?

  1. kubectl namespace set
  2. kubectl config set-context
  3. kubectl context namespace
  4. kubectl use namespace

Correct Answer: 2

Explanation:

kubectl config set-context can modify the namespace associated with a Kubernetes context. For example, administrators can set a preferred namespace so subsequent commands operate there without repeatedly specifying -n. Contexts can also store cluster and user information. This is useful when working across multiple environments or namespaces. Administrators should always verify the active context and namespace before making changes, especially when managing production clusters.

Question 49

Which object runs a task at a scheduled time?

  1. CronJob
  2. DaemonSet
  3. ReplicaSet
  4. Service

Correct Answer: 1

Explanation:

A CronJob creates Jobs according to a defined schedule. It is useful for recurring tasks such as backups, reports, maintenance operations, or periodic processing. Each scheduled execution can create a Job that manages the actual workload. A DaemonSet associates Pods with nodes, a ReplicaSet maintains replicated Pods, and a Service provides network access. CronJob configuration includes scheduling information and Job-related settings that control how scheduled executions are handled.

Question 50

Which field controls how long failed Pods may retry in a Job?

  1. parallelism
  2. completions
  3. backoffLimit
  4. activeDeadline

Correct Answer: 3

Explanation:

The backoffLimit field specifies how many retries are permitted for failed Job Pods before Kubernetes considers the Job failed. It is useful when a batch task may experience temporary failures but should eventually stop retrying after repeated unsuccessful attempts. completions describes the required number of successful Pods, while parallelism controls how many Pods may run simultaneously. Understanding these fields helps administrators configure predictable batch workloads.

Question 51

Which Kubernetes mechanism prevents eviction below a defined availability level?

  1. LimitRange
  2. ResourceQuota
  3. PodDisruptionBudget
  4. PriorityClass

Correct Answer: 3

Explanation:

A PodDisruptionBudget helps maintain application availability during voluntary disruptions by specifying how much disruption is acceptable. It can require a minimum number of Pods to remain available or limit the number that may be unavailable simultaneously. This is useful during planned maintenance or administrative evictions. It does not guarantee protection from unexpected failures such as hardware problems. LimitRange controls resource defaults and constraints, ResourceQuota limits namespace resource consumption, and PriorityClass influences scheduling priority.

Question 52

Which object provides an identity for processes running inside Pods?

  1. Role
  2. ServiceAccount
  3. Namespace
  4. ClusterRole

Correct Answer: 2

Explanation:

A ServiceAccount provides an identity that workloads can use when interacting with the Kubernetes API. Pods can be configured to run under a particular ServiceAccount, and RBAC permissions can then be associated with that identity. This allows administrators to control what actions an application is permitted to perform. Roles and ClusterRoles define permissions, while Namespaces provide resource organization. Combining ServiceAccounts with appropriate RBAC permissions helps implement controlled access for workloads.

Question 53

Which scheduling mechanism lets a Pod tolerate a node taint?

  1. Toleration
  2. Affinity
  3. Selector
  4. PriorityClass

Correct Answer: 1

Explanation:

A toleration allows a Pod to be scheduled onto a node carrying a matching taint. Taints are applied to nodes to repel workloads that do not explicitly tolerate them. A toleration therefore provides permission to run on the tainted node, but it does not itself require that placement. Affinity controls placement preferences or requirements, selectors identify matching resources, and PriorityClass influences scheduling priority. Understanding taints and tolerations is important for workload isolation and specialized node usage.

Question 54

Which resource limits total object consumption within a namespace?

  1. NetworkPolicy
  2. ResourceQuota
  3. StorageClass
  4. EndpointSlice

Correct Answer: 2

Explanation:

A ResourceQuota limits aggregate resource consumption within a namespace. It can restrict resources such as CPU, memory, object counts, and other supported Kubernetes resources. Quotas help prevent one namespace or tenant from consuming an uncontrolled share of cluster resources. This is especially useful in multi-team environments. ResourceQuota differs from LimitRange, which can impose constraints or defaults on individual containers and Pods. Both mechanisms can be used together to establish predictable resource governance.

Question 55

Which object assigns a scheduling priority to Pods?

  1. PriorityClass
  2. Service
  3. Secret
  4. ConfigMap

Correct Answer: 1

Explanation:

PriorityClass defines the relative scheduling priority of Pods. Pods associated with higher-priority classes can receive preferential treatment when scheduling decisions are made, particularly when cluster resources are constrained. Priority can also interact with preemption behavior when enabled and appropriate. Services provide networking, Secrets store sensitive information, and ConfigMaps contain configuration data. Administrators should use priorities carefully because high-priority workloads can influence the scheduling of lower-priority applications.

Question 56

Which command shows the current kubectl configuration?

  1. kubectl settings
  2. kubectl config view
  3. kubectl configuration
  4. kubectl context show

Correct Answer: 2

Explanation:

kubectl config view displays the current kubeconfig configuration, including clusters, users, and contexts available to kubectl. This information is useful when diagnosing authentication problems or verifying which cluster and identity are configured. Administrators often work with multiple contexts, so understanding the kubeconfig structure helps prevent accidental operations against the wrong cluster. Sensitive credential information should be handled carefully because configuration files can contain authentication-related data.

Question 57

Which object provides a stable virtual IP for a workload?

  1. Service
  2. Pod
  3. ReplicaSet
  4. Job

Correct Answer: 1

Explanation:

A Service provides a stable virtual network endpoint for a group of Pods. The underlying Pods may be recreated and receive different IP addresses, but clients can continue communicating through the Service abstraction. Different Service types provide different exposure behaviors, including internal access or external connectivity. ReplicaSets manage Pod replicas, Jobs handle finite tasks, and Pods represent the actual workload units. Service abstraction is therefore fundamental to reliable Kubernetes application networking.

Question 58

Which command retrieves the logs from a previous container instance?

  1. kubectl logs –old
  2. kubectl logs –previous
  3. kubectl logs –history
  4. kubectl logs –restart

Correct Answer: 2

Explanation:

kubectl logs –previous retrieves logs from the previous instance of a container when that container has restarted. This is particularly useful when the current container is running but the previous instance failed. The previous logs may contain the error message or application output that explains the restart. Without this option, administrators may only see logs from the currently running container. It is therefore a valuable troubleshooting command for CrashLoopBackOff and similar restart-related problems.

Question 59

Which component continuously reconciles desired cluster state?

  1. Controller manager
  2. kube-proxy
  3. CoreDNS
  4. Container runtime

Correct Answer: 1

Explanation:

The controller manager runs various controllers that continuously compare desired state with actual cluster state and take corrective action. Examples include controllers responsible for nodes, ReplicaSets, Jobs, and other resources. This reconciliation model is fundamental to Kubernetes because administrators declare what they want, while controllers work to maintain that state. kube-proxy handles service networking, CoreDNS provides DNS functionality, and the container runtime executes containers on nodes.

Question 60

Which storage object represents an administrator-provided volume resource?

  1. PersistentVolumeClaim
  2. StorageClass
  3. PersistentVolume
  4. VolumeMount

Correct Answer: 3

Explanation:

A PersistentVolume represents a storage resource available to the Kubernetes cluster. It can be statically created by an administrator or created dynamically through a StorageClass and compatible provisioner. A PersistentVolumeClaim represents a workload’s request for storage, while a StorageClass defines provisioning behavior. A volume mount describes how storage is exposed inside a container. Understanding the relationship among PVs, PVCs, and StorageClasses is essential for managing persistent application data.