100% Latest & Updated CNCF CKA Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 310
A cluster accepts and stores NetworkPolicy resources, but its CNI plugin has no NetworkPolicy enforcement support. An operator assumes the new default-deny policy is protecting Pods. What is the correct risk assessment? Choose ONE answer.
- Creating the API objects alone does not enforce isolation; deploy and verify a compatible policy-capable CNI.
- Readiness probes enforce all specified ingress restrictions instead.
- Only Pods with public IPs require a NetworkPolicy-capable CNI.
- The API server automatically inserts firewall rules in every node even without a policy CNI.
Explanation
Correct Answer
A:NetworkPolicy specifies desired traffic rules, but an enforcing network plugin must implement them.
Incorrect Answers
B:Probes test health, not arbitrary traffic-policy enforcement.
C:Pod-to-Pod isolation also depends on the dataplane plugin.
D:Standard API storage does not imply dataplane policy enforcement.
Question 311
A cluster stores a valid `Ingress` object with host and path rules, yet no Ingress controller is installed. Pods and backend Services are healthy. What requirement remains unsatisfied for traffic routing? Choose ONE answer.
- Delete the backend Service because it conflicts with Ingress.
- Create an unrelated RBAC Role in each namespace.
- Deploy a supported Ingress controller and arrange its external access as required.
- Increase PersistentVolume capacity for the application.
Explanation
Correct Answer
C:The Ingress API alone declares routing intent; a controller is needed to implement it.
Incorrect Answers
A:Ingress forwards traffic toward Services rather than replacing their endpoint behavior.
B:API permissions do not implement HTTP reverse-proxy routing.
D:Storage size does not turn Ingress configuration into a running proxy.
Question 312
A NetworkPolicy ingress peer includes namespaceSelector.matchExpressions with key `security-reviewed`, operator `Exists`. Namespace `north` has security-reviewed=true and namespace `south` has no such label. Which evaluation is correct? Choose ONE answer.
- Both match because Exists ignores namespace labels entirely.
- Only south matches because it lacks the key.
- north matches; south does not, regardless of the textual value true.
- Neither matches because Exists must have a values list.
Explanation
Correct Answer
C:Exists checks label-key presence rather than its value.
Incorrect Answers
A:Exists still requires the specified key to be present.
B:Missing the key would match DoesNotExist, not Exists.
D:Exists does not require values in the selector expression.
Question 313
A NetworkPolicy ingress rule permits TCP/9000 from a matching client. The client connects to TCP/9001 on the same Pod, and no other allow rules exist. What is true? Choose ONE answer.
- The client is always allowed because it matches an allowed namespace.
- The 9001 connection inherits access because it is numerically close to 9000.
- The Service targetPort controls all Pod ingress rules and bypasses policy.
- The 9001 connection remains blocked when the destination Pod is ingress-isolated.
Explanation
Correct Answer
D:Allowing one TCP port does not implicitly allow adjacent TCP ports.
Incorrect Answers
A:The port restriction remains necessary even when the source peer matches.
B:NetworkPolicy port matching is exact unless a supported range is explicitly configured.
C:Port forwarding by Services does not override destination NetworkPolicy enforcement.
Question 314
A StatefulSet uses a headless Service (`clusterIP: None`) named `db-peers`. Its three Ready Pods have unique hostnames and subdomains. A client requests `db-peers.data.svc.cluster.local`. Which response is consistent with headless Service discovery? Choose ONE answer.
- The StatefulSet is automatically converted into a Deployment.
- The headless Service must use NodePort to publish internal Pod records.
- DNS can return addresses of the matching ready backing Pods rather than a single virtual ClusterIP.
- Every headless Service is assigned a stable virtual IP like ordinary ClusterIP Services.
Explanation
Correct Answer
C:Headless Services do not allocate a cluster virtual IP; DNS exposes endpoint addresses for direct client selection.
Incorrect Answers
A:Service DNS shape has no authority to change the controller kind of its backing Pods.
B:NodePort exposure is unrelated to headless DNS endpoint records.
D:clusterIP None means no Service virtual IP is allocated.
Question 315
An operator wants to guarantee that standard NetworkPolicy isolates a Pod from all traffic originating on its own node. Which assumption is unsafe? Choose ONE answer.
- Testing observed packet behavior after policy changes.
- Confirming the CNI supports the API.
- Assuming normal NetworkPolicy can block all node-to-Pod traffic.
- Reviewing what namespace and Pod selectors match.
Explanation
Correct Answer
C:NetworkPolicy explicitly has caveats for traffic between Pods and their local node and varies by plugin.
Incorrect Answers
A:Practical policy verification is appropriate given plugin-specific nuances.
B:Checking actual CNI enforcement is necessary, not an unsafe assumption.
D:Selection determines which Pods become policy-isolated.
Question 316
A NetworkPolicy exists in `orders` and selects Pods labeled `app=checkout`. A Pod labeled `app=checkout` exists in `payments` but none in `orders`. Which object does that policy isolate? Choose ONE answer.
- No Pods in `payments`; top-level podSelector is confined to the NetworkPolicy namespace `orders`.
- Every Pod named checkout across all namespaces.
- All Services whose selectors contain app=checkout.
- Only Pods in payments because the app label matches there.
Explanation
Correct Answer
A:A NetworkPolicy cannot select destination Pods in another namespace merely by matching the same app label.
Incorrect Answers
B:Top-level selection does not cross namespace boundaries.
C:NetworkPolicy selects Pods, not Service resources.
D:The policy object lives in orders and selects destination Pods only within orders.
Question 317
A hostNetwork Pod should resolve in-cluster names such as `api.svc.cluster.local`, but currently inherits host DNS settings and cannot find cluster Services. Which Pod setting is designed for this combination? Choose ONE answer.
- Change every Service to type LoadBalancer.
- Add an IngressClass object to make kubelet populate resolv.conf.
- Set `dnsPolicy: ClusterFirstWithHostNet` and ensure cluster DNS remains reachable.
- Set `dnsPolicy: None` without specifying nameservers.
Explanation
Correct Answer
C:Host-networked Pods need ClusterFirstWithHostNet to retain cluster-first DNS search behavior.
Incorrect Answers
A:The DNS policy of a hostNetwork Pod is independent of Service exposure type.
B:IngressClass selection controls HTTP routing controllers, not Pod DNS policy.
D:A custom none policy requires explicit DNS configuration and does not automatically select cluster DNS.
Question 318
A network-policy-capable CNI enforces a NetworkPolicy in namespace `payments-v2` selecting Pods with `app=api`. The policy has `policyTypes: [Ingress]` and exactly one ingress peer combining `namespaceSelector: team=platform` AND `podSelector: role=collector`, with TCP destination port 9443 allowed. No egress NetworkPolicy isolates the source Pods and there are no other ingress allows. Choose TWO statements.
- An arbitrary Pod may connect on TCP 9444 because the NetworkPolicy port does not matter.
- Any Pod anywhere labeled `role=collector` may connect on TCP 9443.
- All Pods in `team=platform` namespaces may connect on TCP 9443 regardless of Pod labels.
- A `team=platform` namespace Pod carrying `role=collector` may initiate TCP to the selected Pod on 9443.
- A Pod labeled `role=collector` in a namespace without `team=platform` is not allowed by this rule.
Explanation
Correct Answers
D:Both selectors match the same allowed peer and TCP destination port 9443 is listed in the ingress rule. This policy decision is limited to selected Pods in payments-v2 and requires a matching allowed peer, traffic direction, protocol and destination port.
E:Combined namespace and Pod selectors form an AND condition, so the required namespace label is missing.
Incorrect Answers
A:The allow rule is restricted to TCP destination port 9443, not 9444. This policy decision is limited to selected Pods in payments-v2 and requires a matching allowed peer, traffic direction, protocol and destination port.
B:The peer requires the matching source namespace label `team=platform` in addition to its Pod label.
C:The combined peer also requires `role=collector`; namespace matching is not sufficient.
Question 319
A policy selects app=collector in audit, and an operator believes it can prevent the selected Pod from talking to its own node via the local node interface. Choose THREE statements.
- Standard NetworkPolicy does not reliably block traffic between a Pod and its resident node.
- Adding a denied namespaceSelector isolates all node traffic.
- A host firewall or other controls may be needed for node-level restrictions.
- Standard NetworkPolicy is a universal host firewall.
- Policy verification should not assume hostNetwork and node traffic behave like ordinary Pod peers.
- The NetworkPolicy API supports a nodeSelector in from peers.
Explanation
Correct Answers
A:Kubernetes documents node-to-Pod traffic as an exception to normal policy isolation.
C:NetworkPolicy is primarily a Pod traffic isolation API.
E:Host-network behavior varies with implementation.
Incorrect Answers
B:Node traffic is not equivalent to Namespace Pod selection.
D:Node-local traffic is a documented exception.
F:Standard peers use podSelector, namespaceSelector, and ipBlock, not nodeSelector.
Question 320
A Service frontend listens on port 80 with targetPort: app-http. Two selected Pods each name their container port app-http, one 8080 and another 9080. Which statements are true? Choose ONE answer.
- Both Pods must use the same backend numeric port.
- A named targetPort resolves separately for each selected Pod.
- A named targetPort grants permission through a NetworkPolicy.
- Service port changes the container port field automatically.
Explanation
Correct Answer
B:The same port name may map to different numeric container ports.
Incorrect Answers
A:Named targetPorts specifically permit different backend port numbers.
C:NetworkPolicy is a separate traffic authorization mechanism.
D:Service routing does not mutate Pod spec.
Certified Kubernetes Administrator (CKA) Practice Tests