Ship the policy. Not the outage.
See which real flows a Cilium network policy would break before it merges.
Try the Lab · Watch the demo · Docs · Website
A CiliumNetworkPolicy can pass review, pass CI and still take down
production. It might lock a database down to "just the app" and forget the
metrics exporter, or forget the kubelet health probe (reserved:host), or
DNS. Every one of those is valid YAML. Usually the first sign is a page.
GuardBee replays your cluster's real recent traffic through Cilium's own policy engine twice: once with today's policies, once with your candidate added. Then it tells you what changes.
$ guardbee verdict -n postgres --last 50 looks-correct.yaml
NEWLY_DROPPED observability/prometheus-xxxxx -> postgres/postgres-xxxxx
TCP:9187 (currently allowed; this candidate would start blocking it)
NEWLY_DROPPED reserved:host -> postgres/postgres-xxxxx
TCP:5432 (currently allowed; this candidate would start blocking it)
50 flows sampled: 15 unchanged, 17 newly dropped, 0 newly allowed, ...
17 real flow(s) would BREAK if this candidate merged as-is —
review the NEWLY_DROPPED rows above before shipping it.The candidate was never applied. GuardBee reads it as a file.
- It runs Cilium's code, not a reimplementation. GuardBee embeds Cilium's
own
pkg/policyengine, pinned to an exact Cilium release. The release tag names it, e.g.v1.20.4-6. - It judges real traffic. The flows come straight from Hubble, from your own cluster. Nothing is synthetic.
- It stays out of your cluster. It's a single local binary that uses your kubeconfig. There's no in-cluster agent and no flow database, and it's read-only by default.
- It tells you what it can't judge. Anything it can't simulate faithfully
is named, never guessed. For example, live policies using
fromNodes/toNodesare skipped with a warning (Hubble flows carry no node labels), and a KubernetesNetworkPolicyin a candidate file is listed under "Not judged" (only CNP and CCNP are judged). Known limits →
1. Install: grab a release binary (Linux and macOS, amd64 and arm64), or use Nix:
nix run github:tchellomello/guardbee -- version2. No cluster handy? The Lab brings up a local kind cluster with Cilium and reproduces the regression above, step by step:
git clone https://github.com/tchellomello/guardbee && cd guardbee
mise run lab-up3. On your own cluster (Hubble Relay enabled, read-only RBAC in
kubernetes/rbac.yaml):
guardbee verdict -n my-app my-candidate.yaml # what would this break?
guardbee ui # same engine, in the browser| Command | What it answers |
|---|---|
verdict |
Which real flows would this candidate newly drop or newly allow? |
blame |
Which live policy (or default deny) allowed or dropped this pod's traffic? |
flows |
What traffic is actually hitting this namespace? Filters follow hubble's flag names. |
policies |
Which CNPs and CCNPs are live right now? |
ui |
All of the above in a local web UI with a graph-based policy editor. It calls the exact same functions as the CLI. |
verdict also handles L7 rules: it judges each DNS query and HTTP request
Hubble recorded, and it handles toFQDNs candidates before they're live.
guardbee ui --enable-probes adds opt-in, bounded
TCP/UDP connectivity tests.
That flag is the only feature that changes anything in the cluster.
guardbee verdict -n my-app --fail-on-dropped --min-flows 20 --format markdown candidate.yamlThe command exits non-zero if a real flow would break, and --format markdown
prints a summary you can post as a PR comment.
A ready-made GitHub Actions workflow → · Exit codes and JSON output →
| Quickstart | Catch a real regression on a local kind cluster in about ten minutes |
| Install | Release binaries, Nix flake (NixOS, Home Manager), versioning |
| Run on your cluster | Prerequisites, read-only RBAC, kubeconfig |
| Gate PRs in CI | A copy-paste GitHub Actions workflow that comments and fails on regressions |
| Lab · Lab extras · Zero-trust walkthrough | Hands-on: the full regression story, then connectivity tests, L7 rules, toFQDNs, and least privilege from default deny |
| Commands | Every subcommand and flag |
| How it works · FAQ | The engine, its known limits, how it differs from hubble, dry-run and audit mode |
| Build from source | mise or plain Go |
Issues and PRs are welcome. Before you make a non-trivial change to the engine
(verdict.go), read AGENTS.md for the architecture
principles, the known Cilium-internals gotchas and the house style.
