The correct answer is that all egress traffic except to kube-dns is denied. This is because the Kubernetes network policy in the exhibit explicitly defines an egress rule allowing only UDP traffic on port 53 to the kube-dns service, and since no other egress rules are present, the default deny behavior blocks all other outbound connections from the webapp pod to external services. On the Microsoft Cybersecurity Architect exam, this scenario tests your understanding of how Kubernetes network policies enforce zero-trust segmentation, often appearing in questions about securing pod-to-external communication in production namespaces. A common trap is assuming that an egress rule permitting DNS implicitly allows other traffic, but remember: Kubernetes network policies are additive—only explicitly allowed traffic passes. For a quick memory tip, think “DNS only, deny the rest” to recall that egress rules must be paired with a default deny to achieve the intended restriction.
SC-100 Design security for infrastructure Practice Question
This SC-100 practice question tests your understanding of design security for infrastructure. 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.
Exhibit
Refer to the exhibit.
```
$ kubectl get pods -n production
NAME READY STATUS RESTARTS AGE
webapp-7d5b6c8b9-abc 1/1 Running 0 2d
webapp-7d5b6c8b9-def 1/1 Running 0 2d
$ kubectl get networkpolicy -n production
NAME POD-SELECTOR AGE
allow-egress-dns {} 1d
$ kubectl describe networkpolicy allow-egress-dns -n production
...
Spec:
PodSelector: <none>
Egress:
To:
- NamespaceSelector: {}
PodSelector:
MatchLabels:
k8s-app: kube-dns
Ports:
- Port: 53
Protocol: UDP
PolicyTypes:
- Egress
```
Refer to the exhibit. A network policy is applied in the production namespace. What is the effect on the webapp pod's ability to reach external services?
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
All egress traffic except to kube-dns is denied
Option D is correct because the network policy in the exhibit defines an egress rule that only allows traffic to kube-dns (port 53, UDP) and denies all other egress traffic by default. Since no other egress rules are specified, the webapp pod cannot reach any external services except the cluster's DNS resolver.
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.
✗
Ingress traffic is blocked
Why it's wrong here
The policy only applies to egress.
✗
The pod can only communicate with kube-dns
Why it's wrong here
Only DNS traffic is allowed; other egress is denied.
✗
The pod can communicate with any service
Why it's wrong here
Egress is restricted.
✓
All egress traffic except to kube-dns is denied
Why this is correct
The policy denies egress by default except for DNS.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often assume a network policy only affects ingress traffic or that a single egress rule allows all traffic, but in Kubernetes, any egress rule in a policy triggers a default-deny for all other egress traffic unless explicitly allowed.
Detailed technical explanation
How to think about this question
Kubernetes network policies use a default-deny model for egress when an egress rule is defined; any pod selected by the policy can only send traffic matching the allowed destinations and ports. The policy shown uses a podSelector to target the webapp pod and an egress rule with an ipBlock or namespaceSelector to allow only kube-dns on UDP port 53, effectively blocking all other outbound connections, including HTTP/HTTPS to external services. This behavior is defined in the Kubernetes NetworkPolicy API (networking.k8s.io/v1), where an empty egress rule list results in no egress traffic being allowed.
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 healthcare organisation deploys an application with a public-facing web tier and a private database tier. The database subnet has no public IP and only accepts connections from the web tier's security group. Questions like this test whether you can design cloud network isolation using VNets/VPCs, subnets, and security group rules.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this SC-100 question in full detail.
Design security for infrastructure — This question tests Design security for infrastructure — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: All egress traffic except to kube-dns is denied — Option D is correct because the network policy in the exhibit defines an egress rule that only allows traffic to kube-dns (port 53, UDP) and denies all other egress traffic by default. Since no other egress rules are specified, the webapp pod cannot reach any external services except the cluster's DNS resolver.
What should I do if I get this SC-100 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 →
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.
This SC-100 practice question is part of Courseiva's free Microsoft 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 SC-100 exam.
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.
Sign in to join the discussion.