Explains Cilium’s policy audit mode for observing would-be allows or denies, how to enable globally or per-endpoint, and how to inspect audited flows with Hubble
In this lesson you’ll learn how Cilium’s policy audit mode works and how to enable it. Policy audit mode lets you observe what a CiliumNetworkPolicy would do (allow or deny) without actually dropping traffic. This is useful for validating policies safely before enforcing them in production.What does audit mode look like in practice? Consider three pods: frontend, backend, and db. You apply a policy that selects the db pod and allows ingress only from backend:
With audit mode enabled, traffic that would normally be denied (for example, frontend -> db) is still allowed, but Cilium logs that the flow would have been denied. This enables safe, observable policy rollouts without blackholing traffic.
Why use policy audit mode?
Validate policies by observing “would-be” denies without impacting live traffic.
Identify false positives or unintended blocks before switching to enforcement.
Roll out complex network policies gradually and safely.
Verdicts and their meanings (quick reference):
Policy Verdict
Meaning
none (INGRESS AUDITED)
Traffic would be denied by policy, but audit mode allowed the flow and recorded the audited verdict.
L3-Only (INGRESS ALLOWED)
Traffic is allowed by the policy (L3 match) and is permitted.
other verdicts
May indicate more specific L4/L7 evaluation — inspect Hubble logs for details.
How to enable audit mode
There are two ways to enable policy audit mode:
Globally (all endpoints) via Helm — requires restarting Cilium components.
Per-endpoint (specific endpoints) using cilium-dbg — no cluster-wide restart required.
Enable audit mode globally
Edit your Cilium Helm chart values to turn on audit mode:
Copy
policyAuditMode: true
After updating Helm values, restart the Cilium operator and agent so the change takes effect:
Use cilium-dbg inside a cilium-agent pod to change a single endpoint’s configuration. Replace variables with your values:
Copy
# Set these variables appropriatelyCILIUM_NAMESPACE=kube-systemCILIUM_POD=<cilium-agent-pod-name>ENDPOINT=<endpoint-id>kubectl -n "$CILIUM_NAMESPACE" exec "$CILIUM_POD" -c cilium-agent -- \ cilium-dbg endpoint config "$ENDPOINT" PolicyAuditMode=Enabled
Inspecting audited flows with Hubble
After enabling audit mode (globally or per-endpoint), use Hubble to observe flows and policy verdicts. Audited (would-be denied) traffic is labeled with a policy verdict of “none” and the text “INGRESS AUDITED”. Allowed traffic will show the appropriate allowed verdict and “INGRESS ALLOWED”.Example: frontend -> db (audited, would be denied)
Policy audit mode is ideal for testing and validating network policies safely. Use it to identify unexpected denies and tune your rules before switching to enforcement.
Audit mode does not provide network isolation or enforce security controls. Do not rely on audit mode for protection — enable policy enforcement only after you have validated the behavior.