diff --git a/docs/antrea-network-policy.md b/docs/antrea-network-policy.md index c014c8fdb4e..f9b4b8205bd 100644 --- a/docs/antrea-network-policy.md +++ b/docs/antrea-network-policy.md @@ -647,6 +647,25 @@ The rules are logged in the following format: 2021/06/24 23:56:41.346165 AntreaPolicyEgressRule AntreaNetworkPolicy:default/test-anp Drop 44900 10.10.1.65 35402 10.0.0.5 80 TCP 60 [3 packets in 1.011379442s] ``` +Kubernetes Network Policies can also be audited using Antrea logging to the same file +(`/var/log/antrea/networkpolicy/np.log`). Set the Namespace Annotations to +`policy.antrea.io/enable-np-logging: "true"`, then all the rules of Kubernetes Network +Policies in this Namespace will be processed similar to setting their `enableLogging` +field to true. Packet of any connection that matches the rules will be logged with +Kubernetes Network Policy reference, but packets dropped by implicit default drop +will only be logged with consistent name `K8sNetworkPolicy` for reference. +The rules are logged in the following format: + +```text +