<p>I'm interested in using Kubernetes NetworkPolicy to control network policy. I want to know if the NetworkPolicy is blocking traffic so I can either fix the policies or fix/stop whatever is in violation. </p>

<p>We use Calico and they view this as a paid feature. <a href="https://github.com/projectcalico/calico/issues/1035" rel="noreferrer">https://github.com/projectcalico/calico/issues/1035</a></p>

<p>Cilium has <code>cilium monitor</code> which sounds like it would work if we started using Cilium.
<a href="http://docs.cilium.io/en/latest/troubleshooting/" rel="noreferrer">http://docs.cilium.io/en/latest/troubleshooting/</a></p>

<p>Is there a general, vendor-neutral way to monitor network traffic that violates Kuberenetes NetworkPolicy?</p>

<p>AFAIU, there is no way to create such vendor-neutral tool because NetworkPolicy is just an abstraction. Each networking plugin enforces them differently, (Cilium does that mostly in BPF for L3 and L4 and Envoy for L7), so each plugin needs to provide its own means of accessing this information.</p>

<p>AFAIK, there is no initiative in Kubernetes community to store this information and provide an interface for CNI plugins to provide this information, but it seems like it would be a fun project.</p>

<p>Disclaimer: I am on Cilium dev team.</p>
