100% Latest & Updated CNCF CKA Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 280
An ingress allow list for app=collector in audit has two distinct from list items: namespaceSelector team=finance, and podSelector role=api. It allows TCP/5432. Choose THREE statements.
- Either distinct peer entry can satisfy the from condition.
- A Pod labeled role=api in namespace audit can match the podSelector peer.
- A Pod from any namespace labeled team=finance can match the namespaceSelector peer.
- Both selectors must match the same Pod.
- The rule allows UDP/5432 because TCP is listed.
- role=api in a random other namespace matches the podSelector-only peer.
Explanation
Correct Answers
A:Separate from array elements are OR alternatives. The superficially plausible alternative 'The rule allows UDP/5432 because TCP is listed' fails on a different constraint: NetworkPolicy protocol matching distinguishes TCP and UDP.
B:A podSelector-only peer is scoped to the policy namespace.
C:That list element selects the namespace independently of its Pod role.
Incorrect Answers
D:The selectors are in separate peer list items, not a combined peer. The choice that fits these stated constraints is 'A Pod from any namespace labeled team=finance can match the namespaceSelector peer': That list element selects the namespace independently of its Pod role.
E:NetworkPolicy protocol matching distinguishes TCP and UDP. The choice that fits these stated constraints is 'A Pod labeled role=api in namespace audit can match the podSelector peer': A podSelector-only peer is scoped to the policy namespace.
F:A podSelector-only peer is local to the policy namespace. The choice that fits these stated constraints is 'A Pod labeled role=api in namespace audit can match the podSelector peer': A podSelector-only peer is scoped to the policy namespace.
Question 281
A NetworkPolicy ingress peer uses `namespaceSelector` matching `tier=trusted` and `podSelector: {}` within the same peer entry. Which sources are selected? Choose ONE answer.
- No Pods because empty podSelector is invalid.
- Every Pod within namespaces labeled `tier=trusted`, subject to the rest of the rule.
- All Pods in all namespaces regardless of labels.
- Only Pods in the policy namespace.
Explanation
Correct Answer
B:An empty Pod selector within a peer matches all Pods in the selected namespaces.
Incorrect Answers
A:An empty label selector is valid and means all Pods in the selected scope.
C:The namespaceSelector still restricts which namespaces qualify.
D:The namespaceSelector explicitly targets matching namespaces, not necessarily the policy namespace.
Question 282
A Service selects two replicas. Both Pods have correct labels but `kubectl get endpointslices` shows only one endpoint Ready; the second Pod fails its readiness probe. Which expectation is correct for normal Service routing? Choose ONE answer.
- Matching Pod labels guarantee traffic even when readiness fails.
- The Service must delete the unready Pod to maintain its ClusterIP.
- Making the Service headless automatically marks every endpoint Ready.
- The unready endpoint should not receive ordinary Service traffic until readiness becomes true.
Explanation
Correct Answer
D:Endpoint readiness influences normal backend selection independent of matching labels.
Incorrect Answers
A:Selection identifies candidate Pods; endpoint readiness further determines usable backends.
B:Service controllers manage endpoints and do not have to delete an unready workload.
C:Headless DNS behavior does not override failing application readiness conditions.
Question 283
A NetworkPolicy in audit selects app=collector, policyTypes [Egress], and allows only TCP/5432 to an application peer. The selected Pod uses CoreDNS on UDP/53. Choose ONE answer.
- TCP/5432 to the app permits UDP/53 to all destinations.
- UDP/53 DNS traffic is not allowed by the stated egress rule.
- The ingress rule implicitly allows UDP/53.
- All DNS is exempt from NetworkPolicy.
Explanation
Correct Answer
B:NetworkPolicy has no automatic DNS exception. This policy decision is limited to selected Pods in the policy namespace and requires a matching allowed peer, traffic direction, protocol and destination port (the stated test includes port 5432).
Incorrect Answers
A:Ports, protocols, and destinations are separately matched. This policy decision is limited to selected Pods in the policy namespace and requires a matching allowed peer, traffic direction, protocol and destination port (the stated test includes port 5432).
C:This policy contains no ingress rule and egress is independent. This policy decision is limited to selected Pods in the policy namespace and requires a matching allowed peer, traffic direction, protocol and destination port (the stated test includes port 5432).
D:No universal DNS bypass exists. This policy decision is limited to selected Pods in the policy namespace and requires a matching allowed peer, traffic direction, protocol and destination port (the stated test includes port 5432).
Question 284
A source Pod has egress isolation that permits destination TCP/3306, but destination database Pods have ingress isolation with no corresponding allow. Both Pods can otherwise communicate. Why is the connection blocked? Choose ONE answer.
- TCP/3306 cannot be used in NetworkPolicy.
- An isolated flow needs to satisfy both source egress and destination ingress permissions.
- The ServiceAccount permissions must be cluster-admin for TCP connections.
- Egress rules automatically create matching ingress permissions on remote Pods.
Explanation
Correct Answer
B:Allowing egress from the caller does not override ingress isolation at the destination.
Incorrect Answers
A:NetworkPolicy supports protocol/port rules including arbitrary TCP ports.
C:Kubernetes RBAC API permissions do not replace network-policy traffic authorization.
D:Policies apply at their own selected Pod direction; they do not synthesize peer rules.
Question 285
A default-deny NetworkPolicy was accepted by the API server, but Pods still reach unapproved peers. The installed networking implementation does not support NetworkPolicy enforcement. What explains this? Choose ONE answer.
- The API object exists without dataplane enforcement.
- The Pod selectors automatically disable enforcement in every cluster.
- A default-deny rule only works on port 443.
- RBAC allows Pods to bypass all network filters.
Explanation
Correct Answer
A:NetworkPolicy resources require a policy-capable networking plugin to affect traffic.
Incorrect Answers
B:Selectors are supported when the underlying plugin enforces NetworkPolicy.
C:Standard policies can restrict many protocols/ports; the missing capability is enforcement.
D:API RBAC does not authorize bypass of dataplane policy enforcement.
Question 286
Two NetworkPolicies select the same app=collector Pods in audit. One allows TCP/443 ingress from role=frontend; the other allows TCP/5432 ingress from role=monitor. Choose ONE answer.
- The last-created NetworkPolicy overwrites the first.
- The policies process a first-match deny rule for everything else.
- Either policy can contribute a matching ingress allow.
- Allowing TCP/443 automatically allows SSH port 22.
Explanation
Correct Answer
C:NetworkPolicy allows are additive, not priority-ordered. The superficially plausible alternative 'The policies process a first-match deny rule for everything else' fails on a different constraint: NetworkPolicy has no ordered explicit deny rules.
Incorrect Answers
A:Kubernetes policy rules are additive across selecting policies. The choice that fits these stated constraints is 'Either policy can contribute a matching ingress allow': NetworkPolicy allows are additive, not priority-ordered.
B:NetworkPolicy has no ordered explicit deny rules. The choice that fits these stated constraints is 'Either policy can contribute a matching ingress allow': NetworkPolicy allows are additive, not priority-ordered.
D:The permitted ports are specific. The choice that fits these stated constraints is 'Either policy can contribute a matching ingress allow': NetworkPolicy allows are additive, not priority-ordered.
Question 287
A security engineer assumes standard NetworkPolicy will always isolate `hostNetwork: true` Pods identically across CNI implementations. What qualification should be made before accepting that control? Choose ONE answer.
- Verify the chosen CNI behavior for host-network Pods and separately protect node-network access.
- Every CNI must implement standard NetworkPolicy in exactly the same way.
- Adding a Service port automatically isolates all host-network connections.
- Host-network Pods always use a distinct Pod IP from the node.
Explanation
Correct Answer
A:Host-network handling may depend on the network plugin; ordinary policy guarantees should not be overstated for it.
Incorrect Answers
B:NetworkPolicy enforcement and special traffic cases have implementation dependencies.
C:Service publication is not equivalent to CNI enforcement against node-network traffic.
D:hostNetwork shares the node network namespace and is not the normal separate Pod-network model.
Question 288
A NetworkPolicy in namespace `edge` selects Pods labeled `app=worker` and specifies only `policyTypes: [Egress]`. It permits TCP egress to Pods with `role=gateway` in namespaces labeled `team=clients` on port 8081, but contains no DNS egress allowance. The Pod uses cluster DNS on UDP/TCP 53; its ingress is not selected by another policy. Choose ONE statement.
- The displayed policy does not by itself isolate inbound traffic to its selected Pods.
- The rule also permits TCP 8082 to the same matching destination.
- UDP DNS to port 53 is implicitly permitted for all egress-isolated Pods.
- Every destination is reachable because egress isolation requires a matching ingress policy.
Explanation
Correct Answer
A:Only Egress appears in policyTypes, so ingress remains unaffected by this particular policy. This policy decision is limited to selected Pods in edge and requires a matching allowed peer, traffic direction, protocol and destination port (the stated test includes port 53).
Incorrect Answers
B:The allow list specifies destination port 8081, not 8082.
C:NetworkPolicy has no universal DNS exemption; DNS must be allowed explicitly for isolated clients. This policy decision is limited to selected Pods in edge and requires a matching allowed peer, traffic direction, protocol and destination port (the stated test includes port 53).
D:Egress and ingress isolation are independent; the Egress policy restricts outgoing selected Pod connections. This policy decision is limited to selected Pods in edge and requires a matching allowed peer, traffic direction, protocol and destination port (the stated test includes port 53).
Question 289
A policy selects app=collector in audit and allows ingress from matching Pods on protocol TCP, port 5432. A test sends UDP to the same numeric port. Choose TWO statements.
- All protocols share a port grant automatically.
- The source peer selector must still match for TCP traffic.
- The policy alters the port number exposed by the container.
- The UDP connection does not match a TCP-only allow.
- A matching source bypasses the protocol field.
Explanation
Correct Answers
B:Allowed ports alone never authorize an unmatched source. The superficially plausible alternative 'A matching source bypasses the protocol field' fails on a different constraint: Both peer and port constraints must be satisfied.
D:Protocol is part of the NetworkPolicy port match. The superficially plausible alternative 'A matching source bypasses the protocol field' fails on a different constraint: Both peer and port constraints must be satisfied.
Incorrect Answers
A:TCP does not imply UDP. The choice that fits these stated constraints is 'The UDP connection does not match a TCP-only allow': Protocol is part of the NetworkPolicy port match.
C:NetworkPolicy authorizes packet flows; it does not modify container listeners. The choice that fits these stated constraints is 'The UDP connection does not match a TCP-only allow': Protocol is part of the NetworkPolicy port match.
E:Both peer and port constraints must be satisfied. The choice that fits these stated constraints is 'The UDP connection does not match a TCP-only allow': Protocol is part of the NetworkPolicy port match.
Question 290
An egress ipBlock allows 10.20.0.0/16 except 10.20.4.0/24, TCP/5432; app=collector is egress-isolated in audit. Choose THREE statements.
- UDP/5432 matches a TCP-only rule.
- Both destination and TCP/5432 must match.
- A CIDR policy modifies the destination IP address.
- Traffic to 10.20.5.17 is inside the allowed /16 and outside the except range.
- Traffic to 10.20.4.17 is excluded by the except range.
- Every destination in 10.20.0.0/16 is allowed unconditionally.
Explanation
Correct Answers
B:An ipBlock condition does not remove the port restriction.
D:The address satisfies the outer block without matching the exclusion.
E:That address is inside the excluded /24. The superficially plausible alternative 'Every destination in 10.20.0.0/16 is allowed unconditionally' fails on a different constraint: The except /24 removes part of the range.
Incorrect Answers
A:The allowed protocol is TCP. The choice that fits these stated constraints is 'Traffic to 10.20.5.17 is inside the allowed /16 and outside the except range': The address satisfies the outer block without matching the exclusion.
C:NetworkPolicy filters allowed traffic rather than rewriting addressing. The choice that fits these stated constraints is 'Both destination and TCP/5432 must match': An ipBlock condition does not remove the port restriction.
F:The except /24 removes part of the range. The choice that fits these stated constraints is 'Traffic to 10.20.5.17 is inside the allowed /16 and outside the except range': The address satisfies the outer block without matching the exclusion.
Certified Kubernetes Administrator (CKA) Practice Tests