Kubernetes - NetworkingWhy does a Kubernetes NetworkPolicy with no egress rules block all outbound traffic by default?ABecause NetworkPolicy only controls ingress trafficBBecause egress is allowed by default unless explicitly blockedCBecause specifying any policyTypes disables all traffic not explicitly allowedDBecause pods ignore NetworkPolicy without egress rulesCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand NetworkPolicy default deny behaviorWhen policyTypes includes Egress, any traffic not explicitly allowed is denied.Step 2: Clarify effect of no egress rulesHaving no egress rules means no allowed outbound traffic, so all egress is blocked.Final Answer:Specifying policyTypes disables all traffic not explicitly allowed -> Option CQuick Check:Explicit policyTypes cause default deny for unspecified traffic [OK]Quick Trick: Explicit policyTypes cause default deny for unspecified traffic [OK]Common Mistakes:Thinking egress is allowed by default alwaysBelieving NetworkPolicy only controls ingressAssuming pods ignore incomplete policies
Master "Networking" in Kubernetes9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kubernetes Quizzes Health Checks and Probes - HTTP probe configuration - Quiz 5medium Health Checks and Probes - Probe failure and container restart behavior - Quiz 7medium Networking - Network policies for traffic control - Quiz 1easy Persistent Storage - Storage classes for dynamic provisioning - Quiz 4medium Resource Management - CPU requests and limits - Quiz 8hard Resource Management - CPU requests and limits - Quiz 11easy Resource Management - Memory requests and limits - Quiz 7medium Resource Management - Cluster Autoscaler concept - Quiz 9hard Scheduling - Resource requests and limits - Quiz 15hard Secrets - Secrets are not encrypted by default - Quiz 8hard