networkpolicy-debug

Diagnose Kubernetes NetworkPolicy connectivity issues by analyzing ingress and egress rules.

225|28|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/scitix/siclaw --skill networkpolicy-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: networkpolicy-debug
Source: https://github.com/scitix/siclaw/tree/main/skills/core/networkpolicy-debug
Command: npx skills add https://github.com/scitix/siclaw --skill networkpolicy-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps diagnose and understand why network traffic is unexpectedly blocked between pods or to external services, specifically when NetworkPolicies are suspected as the cause.

Core Features & Use Cases

  • Identify Blocking Policies: Determines which NetworkPolicies (standard or CNI-specific) are selecting a target pod.
  • Verify CNI Support: Checks if the cluster's CNI plugin actually enforces NetworkPolicies.
  • Analyze Rules: Examines ingress and egress rules within identified policies to pinpoint the exact cause of traffic blockage.
  • Diagnose DNS/API Issues: Specifically checks for egress policies blocking essential DNS or Kubernetes API server traffic.
  • Use Case: A new microservice can't communicate with an existing one. After confirming Service and DNS are healthy, this Skill is used to investigate if a newly applied NetworkPolicy is inadvertently blocking the traffic.

Quick Start

Use the networkpolicy-debug skill to diagnose why pod 'my-app-pod' in namespace 'dev' cannot reach external services.

Frequently Asked Questions about networkpolicy-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose why Kubernetes NetworkPolicy is blocking traffic between pods?

Diagnosing Kubernetes NetworkPolicy traffic blocks involves identifying the specific policies selecting a target pod and analyzing their ingress and egress rules. This process pinpoints unexpected traffic blocking caused by default-deny effects or misconfigured rule sets.

What causes a default-deny NetworkPolicy to block pod connectivity in Kubernetes?

A default-deny NetworkPolicy blocks pod connectivity by dropping all ingress or egress traffic that is not explicitly allowed by an additional policy rule. Identifying these restrictive policies requires checking which NetworkPolicies actively select the isolated pod.

How can I tell if my CNI plugin supports Kubernetes NetworkPolicy enforcement?

To check if your CNI plugin enforces Kubernetes NetworkPolicy, you must verify the cluster's CNI configuration and capabilities. If the CNI lacks enforcement support, applied NetworkPolicy rules will not actually block any network traffic.

How do I troubleshoot egress NetworkPolicy rules blocking DNS or API server communication?

Troubleshooting egress NetworkPolicy rules blocking DNS or API server traffic involves examining the egress rules applied to the affected pod. You must verify whether specific exceptions for DNS ports or Kubernetes API server IP addresses are explicitly defined.

Do I need kubectl to investigate unexpected traffic blocking from Kubernetes NetworkPolicies?

Yes, you need kubectl to investigate unexpected traffic blocking from Kubernetes NetworkPolicies. Kubectl provides the cluster interaction required to retrieve NetworkPolicy objects, inspect pod labels, and verify CNI plugin configurations.

Why does my new microservice fail to communicate with an existing one after applying a NetworkPolicy?

Your new microservice fails to communicate after applying a NetworkPolicy because the new rules likely lack the necessary ingress or egress allowances for the existing microservice. Analyzing the applied policy's ingress and egress rules will confirm the exact traffic blockage.