Kubernetes - RBAC and SecurityWhy does a Kubernetes NetworkPolicy with no ingress or egress rules deny all traffic by default?ABecause Kubernetes disables networking until policies are appliedBBecause pods have no IP addresses assignedCBecause NetworkPolicy only controls DNS traffic by defaultDBecause NetworkPolicy defaults to deny all traffic unless explicitly allowedCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand default NetworkPolicy behaviorNetworkPolicy enforces a default deny for traffic directions it controls if no rules allow traffic.Step 2: Confirm why traffic is deniedWithout explicit allow rules, all ingress or egress traffic is blocked.Final Answer:Because NetworkPolicy defaults to deny all traffic unless explicitly allowed -> Option DQuick Check:Default deny unless allowed = A [OK]Quick Trick: NetworkPolicy denies all traffic by default without allow rules [OK]Common Mistakes:Thinking pods lack IPsAssuming NetworkPolicy controls only DNSBelieving Kubernetes disables networking
Master "RBAC and Security" in Kubernetes9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kubernetes Quizzes Advanced Deployment Patterns - A/B testing with Ingress - Quiz 12easy Helm Package Manager - Creating custom Helm charts - Quiz 4medium Helm Package Manager - Upgrading and rolling back releases - Quiz 15hard Monitoring and Logging - Alerting with Prometheus Alertmanager - Quiz 9hard Operators and Custom Resources - Custom resources concept - Quiz 5medium Operators and Custom Resources - Why operators extend Kubernetes - Quiz 2easy Production Best Practices - Priority classes for critical workloads - Quiz 5medium Production Best Practices - Multi-cluster management concept - Quiz 9hard Production Best Practices - Why production readiness matters - Quiz 14medium Troubleshooting - Pod stuck in Pending state - Quiz 1easy