View Full CNCF CKA Exam Dumps and Practice Test Dumps
Question 61
Which command creates a namespace directly from kubectl?
- kubectl make namespace
- kubectl namespace create
- kubectl create namespace
- kubectl new namespace
Correct Answer: 3
Explanation:
The kubectl create namespace command creates a new Kubernetes namespace directly from the command line. Namespaces provide logical separation for resources within a cluster and are commonly used to organize applications, teams, or environments. Administrators can subsequently specify the namespace when creating or querying resources. Namespaces also work with mechanisms such as ResourceQuota and RBAC to establish resource and access boundaries. Using the correct command syntax is important during practical cluster administration tasks.
Question 62
Which field identifies a Pod’s controlling workload through metadata?
- ownerReferences
- resourceVersion
- generation
- managedFields
Correct Answer: 1
Explanation:
The ownerReferences field identifies resources that own or control another Kubernetes object. For example, a ReplicaSet can own Pods, while a Deployment can own a ReplicaSet. Kubernetes uses ownership relationships for lifecycle management and garbage collection. When troubleshooting unexpectedly recreated resources, examining ownership can reveal which controller is responsible. Other metadata fields serve different purposes: resourceVersion tracks object versions, generation reflects desired-state changes, and managedFields records field management information.
Question 63
Which Pod phase indicates that containers are currently executing?
- Pending
- Failed
- Running
- Succeeded
Correct Answer: 3
Explanation:
The Running Pod phase indicates that the Pod has been bound to a node and that its containers have started, although they may not necessarily be ready to serve application traffic. Pending indicates that the Pod has not yet completed scheduling or startup preparation. Succeeded means containers terminated successfully, while Failed means the containers terminated unsuccessfully. Understanding Pod phases helps administrators quickly interpret workload state during troubleshooting and cluster monitoring.
Question 64
Which probe checks whether an application has started successfully?
- Readiness probe
- Startup probe
- Liveness probe
- Exec command
Correct Answer: 2
Explanation:
A startup probe determines whether an application inside a container has successfully started. It is especially useful for applications that require substantial initialization time. When a startup probe is configured, Kubernetes can delay liveness and readiness evaluation until startup succeeds. A readiness probe determines whether traffic should be sent to the Pod, while a liveness probe determines whether the container should be restarted. Proper probe selection prevents Kubernetes from incorrectly treating slow-starting applications as failed.
Question 65
Which command displays container resource usage in a cluster?
- kubectl metrics
- kubectl usage
- kubectl top
- kubectl resources
Correct Answer: 3
Explanation:
kubectl top displays resource usage information for nodes or Pods when the required metrics infrastructure is available. Administrators can use it to inspect CPU and memory consumption and identify workloads or nodes experiencing significant resource usage. This information complements declared requests and limits because actual consumption may differ from configured values. If metrics are unavailable, the command may return an error rather than useful usage data, so the metrics pipeline must also be considered during troubleshooting.
Question 66
Which Kubernetes object controls default resource settings for containers?
- ResourceQuota
- LimitRange
- PriorityClass
- PodDisruptionBudget
Correct Answer: 2
Explanation:
A LimitRange can establish default resource requests and limits and impose constraints on resource usage within a namespace. This helps administrators maintain consistent resource policies when individual workloads do not specify complete values. ResourceQuota instead controls aggregate consumption across a namespace. PriorityClass affects scheduling priority, while PodDisruptionBudget addresses voluntary disruptions. LimitRange is therefore particularly useful for establishing sensible resource defaults and preventing workloads from being created with inappropriate resource configurations.
Question 67
Which container state commonly indicates an image retrieval failure?
- Waiting
- Running
- Terminated
- Completed
Correct Answer: 1
Explanation:
A container in the Waiting state may be unable to start because Kubernetes is performing preparatory actions or encountering a problem such as an image-pull failure. The detailed reason can be examined using kubectl describe pod, which often displays useful events such as authentication errors, unavailable repositories, or invalid image references. Running means the container has started, while Terminated means its process has stopped. Understanding container states helps distinguish startup problems from runtime failures.
Question 68
Which command streams logs continuously from a running container?
- kubectl logs –watch
- kubectl logs –stream
- kubectl logs –follow
- kubectl logs –tail
Correct Answer: 3
Explanation:
The –follow option causes kubectl logs to continue streaming new log output as it becomes available. This is useful when observing an application during startup, testing, or troubleshooting. Instead of retrieving only the existing log content, the command remains attached and displays subsequent output. The –tail option limits how many recent lines are shown but does not provide the same streaming behavior. Continuous log observation can help identify intermittent application failures.
Question 69
Which Kubernetes feature can terminate lower-priority Pods for scheduling?
- Pod affinity
- Preemption
- Service discovery
- Volume binding
Correct Answer: 2
Explanation:
Preemption allows Kubernetes scheduling to make room for a higher-priority Pod by removing lower-priority Pods when the necessary scheduling conditions are met. It works together with Pod priority settings. Preemption is intended to help satisfy important workload placement requirements when resources are constrained. Administrators should understand its impact because a high-priority workload may cause lower-priority workloads to be evicted. Affinity, service discovery, and volume binding address different scheduling or networking concerns.
Question 70
Which command applies resources described in a YAML manifest?
- kubectl submit
- kubectl deploy
- kubectl apply
- kubectl commit
Correct Answer: 3
Explanation:
kubectl apply creates or updates Kubernetes resources based on declarative configuration. It allows administrators to manage resource definitions as manifests and repeatedly reconcile the cluster with the desired configuration. This differs from imperative commands that directly perform individual operations. Declarative management is central to Kubernetes administration because configuration can be stored, reviewed, versioned, and reused. Administrators should verify the target cluster and namespace before applying manifests to avoid unintended changes.
Question 71
Which field determines a container’s maximum CPU consumption?
- CPU limit
- CPU request
- Memory request
- Pod priority
Correct Answer: 1
Explanation:
A CPU limit defines the maximum CPU resource a container is permitted to consume according to Kubernetes resource enforcement. A CPU request serves primarily as a scheduling requirement, helping Kubernetes select a node with sufficient allocatable capacity. Memory requests and Pod priority serve different purposes. Correctly distinguishing requests from limits is important when diagnosing scheduling behavior and runtime performance. An overly restrictive CPU limit can also affect application responsiveness when workloads experience increased demand.
Question 72
Which Kubernetes resource maps an external hostname to HTTP services?
- EndpointSlice
- Ingress
- Namespace
- ReplicaSet
Correct Answer: 2
Explanation:
An Ingress can define HTTP or HTTPS routing rules that map external requests to Kubernetes Services. Rules may use hostnames and URL paths to determine the appropriate backend. An Ingress requires a compatible controller to implement the defined routing behavior. EndpointSlice tracks backend endpoints, Namespace organizes resources, and ReplicaSet maintains replicated Pods. Ingress is therefore commonly used when administrators need controlled external HTTP or HTTPS access to application services.
Question 73
Which command shows the current cluster contexts?
- kubectl config get-contexts
- kubectl contexts list
- kubectl show contexts
- kubectl get clusters
Correct Answer: 1
Explanation:
kubectl config get-contexts lists the contexts configured in the kubeconfig file. A context combines information such as a cluster, user, and namespace, allowing administrators to switch between different Kubernetes environments. The command is especially useful when working with multiple clusters because it helps verify which contexts are available before selecting one. Confusing contexts can result in commands being executed against an unintended cluster, so context verification is an important administrative habit.
Question 74
Which scheduling object expresses a preference rather than a strict requirement?
- Required affinity
- Preferred affinity
- Node taint
- Pod toleration
Correct Answer: 2
Explanation:
Preferred node affinity expresses a scheduling preference rather than an absolute requirement. The scheduler attempts to honor the preference when possible but can still place the Pod elsewhere if necessary. Required affinity, in contrast, must be satisfied for the Pod to be scheduled. Taints repel Pods unless tolerated, while tolerations permit Pods to run on matching tainted nodes. Understanding the difference between preference and requirement helps administrators design flexible workload placement policies.
Question 75
Which object tracks individual backend addresses for a Service?
- EndpointSlice
- ConfigMap
- Lease
- ResourceQuota
Correct Answer: 1
Explanation:
EndpointSlice stores information about network endpoints associated with a Kubernetes Service. It provides a scalable way to represent backend addresses and related endpoint information, particularly for Services with many endpoints. Kubernetes networking components can use this information to determine where traffic should be directed. ConfigMaps store configuration, Leases support coordination and leadership mechanisms, and ResourceQuota manages namespace consumption. EndpointSlice is therefore an important resource when investigating Service backend behavior.
Question 76
Which object coordinates orderly deployment of stateful replicas?
- ReplicaSet
- StatefulSet
- DaemonSet
- CronJob
Correct Answer: 2
Explanation:
A StatefulSet manages stateful applications that need stable Pod identities and predictable deployment characteristics. It can maintain stable network identities and persistent storage associations while controlling the creation and termination order of replicas. ReplicaSets are primarily used to maintain interchangeable replicated Pods, DaemonSets associate workloads with nodes, and CronJobs create scheduled Jobs. StatefulSets are therefore appropriate for workloads where identity and ordered behavior are important operational requirements.
Question 77
Which command removes a node from active scheduling and evicts workloads?
- kubectl drain
- kubectl cordon
- kubectl isolate
- kubectl evacuate
Correct Answer: 1
Explanation:
kubectl drain prepares a node for maintenance by marking it unschedulable and attempting to evict suitable Pods. It is commonly used before rebooting, upgrading, or replacing a node. Some workloads may require special handling, and drain can encounter blockers such as unmanaged Pods or restrictive disruption policies. kubectl cordon only prevents new scheduling and does not evict existing workloads. Understanding this distinction helps administrators perform node maintenance safely.
Question 78
Which field identifies the namespace of a Kubernetes object?
- namespace
- scope
- tenant
- domain
Correct Answer: 1
Explanation:
The namespace field in an object’s metadata identifies the namespace containing a namespaced Kubernetes resource. Namespaces provide logical boundaries within a cluster and allow administrators to organize resources and apply policies. When creating manifests, specifying the namespace can ensure the object is created in the intended location, although command-line options can also select namespaces. Cluster-scoped resources, such as Nodes, do not belong to a namespace.
Question 79
Which command lists Pods with their assigned node names?
- kubectl get pods –nodes
- kubectl get pods -o wide
- kubectl get pods –placement
- kubectl show pods -n
Correct Answer: 2
Explanation:
kubectl get pods -o wide provides additional Pod information, including the node on which each Pod is scheduled. This is useful when troubleshooting workload distribution, node-specific failures, or unexpected placement. Standard Pod listings provide less detail, while wide output exposes additional fields such as Pod IP and node information. Administrators can combine this output with labels or namespace selection to narrow investigations to specific workloads or environments.
Question 80
Which Kubernetes object stores non-sensitive application settings?
- Secret
- ConfigMap
- CertificateSigningRequest
- Lease
Correct Answer: 2
Explanation:
A ConfigMap stores non-sensitive configuration information that applications can consume through environment variables, command arguments, or mounted files. It helps separate configuration from the container image, allowing the same application image to operate with different settings in different environments. Secrets should be used for sensitive information such as credentials. CertificateSigningRequest relates to certificate requests, while Lease objects support coordination mechanisms. Proper separation of configuration and application code improves deployment flexibility and administration.