Question 314 of 1,005
Services & NetworkinghardMultiple ChoiceObjective-mapped

CKA Services & Networking Practice Question

This CKA practice question tests your understanding of services & networking. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

You are a platform engineer managing a multi-tenant Kubernetes cluster. A development team deploys a StatefulSet for a database with the following configuration: 3 replicas, headless service 'db-headless' for DNS-based discovery, and a regular ClusterIP service 'db' for read/write operations. The cluster uses Calico CNI with default NetworkPolicy enforcement. The team reports that applications in the same namespace can connect to the ClusterIP service but cannot connect to individual pod DNS names (e.g., db-0.db-headless.namespace.svc.cluster.local). You verify that the DNS resolution works (nslookup returns the pod IP). However, a curl to the pod IP on the database port (5432) times out. You check the endpoints and they are correct. Which action should you take to resolve the connectivity issue?

Question 1hardmultiple choice
Read the full DNS explanation →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a NetworkPolicy that allows ingress traffic from all pods in the namespace to the database pods on port 5432.

The issue is that DNS resolution works (pod IPs are returned) but direct pod IP connectivity fails, which points to a network policy blocking traffic. Since Calico CNI enforces NetworkPolicies by default, and no ingress rule allows traffic to the database pods on port 5432, the connection times out. Creating a NetworkPolicy that permits ingress from all pods in the namespace to the database pods on port 5432 resolves the connectivity problem.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Modify the CoreDNS configuration to use a different DNS policy.

    Why it's wrong here

    DNS resolution is working correctly; the issue is network policy, not DNS.

  • Create a NetworkPolicy that allows ingress traffic from all pods in the namespace to the database pods on port 5432.

    Why this is correct

    This policy would explicitly allow direct pod-to-pod traffic, which is currently blocked by a default-deny policy.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Remove the headless service and use a regular ClusterIP service for pod discovery.

    Why it's wrong here

    Headless service is the recommended pattern for StatefulSet DNS-based pod identity. Removing it would break pod identity.

  • Change the ClusterIP service 'db' to NodePort to expose the database on each node.

    Why it's wrong here

    Changing service type does not affect direct pod IP connectivity within the cluster.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates assume DNS resolution success implies full connectivity, overlooking that NetworkPolicy can block traffic at the pod IP level even when DNS works correctly.

Detailed technical explanation

How to think about this question

Calico CNI implements Kubernetes NetworkPolicy by programming iptables or eBPF rules on each node to enforce ingress and egress rules at the pod level. By default, if no NetworkPolicy selects a pod, all traffic is allowed; but once any NetworkPolicy selects a pod, all traffic not explicitly allowed is denied (default-deny ingress behavior). In this scenario, the database pods are likely selected by a NetworkPolicy that does not include an ingress rule for port 5432, causing the timeout when curling the pod IP directly.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A security administrator must allow nursing staff to reach a patient records server while blocking access from the guest Wi-Fi VLAN. After applying an extended ACL, traffic is still blocked from nursing workstations. The ACL was applied outbound instead of inbound on the wrong interface. Questions like this test ACL direction and placement rules.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related CKA practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free CKA practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this CKA question test?

Services & Networking — This question tests Services & Networking — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Create a NetworkPolicy that allows ingress traffic from all pods in the namespace to the database pods on port 5432. — The issue is that DNS resolution works (pod IPs are returned) but direct pod IP connectivity fails, which points to a network policy blocking traffic. Since Calico CNI enforces NetworkPolicies by default, and no ingress rule allows traffic to the database pods on port 5432, the connection times out. Creating a NetworkPolicy that permits ingress from all pods in the namespace to the database pods on port 5432 resolves the connectivity problem.

What should I do if I get this CKA question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This CKA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKA exam.