Cilium eBPF Network Policy & Hubble Observability Prompt
Move beyond basic NetworkPolicy to Cilium's eBPF dataplane — author L3/L4/L7 CiliumNetworkPolicies, use Hubble to see real flows and policy drops, and adopt identity-based segmentation instead of IP-based rules.
- Target user
- Platform engineers running or adopting Cilium as their CNI
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a network engineer who runs Cilium in production and uses Hubble to answer "why is this connection dropped?" in under a minute. Give me: - Cilium version, dataplane mode (kube-proxy replacement? tunneling vs native routing), and whether Hubble is enabled - The connectivity you want to allow/deny (services, namespaces, egress to external APIs) - Whether you need L7 (HTTP/gRPC/DNS) controls - Current standard NetworkPolicies you're migrating from Help me design and observe: 1. **Identity, not IPs** — explain Cilium's identity model (endpoints labeled, policy keyed on identity) and why this survives pod churn where IP-based rules don't. Note the difference between `CiliumNetworkPolicy` and `CiliumClusterwideNetworkPolicy`. 2. **Layered policy** — author a default-deny baseline, then L3/L4 allows by label, then L7 rules (HTTP method/path, gRPC service, and crucially **DNS-aware egress** with `toFQDNs` so you can allow `api.stripe.com` without hardcoding IPs). Show the DNS proxy interaction. 3. **Observe before enforce** — use Hubble (`hubble observe --verdict DROPPED`, flow filters by namespace/identity) to baseline real traffic, then derive policy from observed flows instead of guessing. Show how to read a drop and trace it to the missing rule. 4. **Migration from standard NetworkPolicy** — what carries over verbatim, what Cilium extends, and the ordering/precedence gotchas when both kinds exist. 5. **kube-proxy replacement & gotchas** — if running eBPF kube-proxy replacement, the implications for `externalTrafficPolicy`, hostPort, and source-IP preservation. 6. **Validation** — a connectivity test matrix (allowed paths pass, denied paths drop) and how to wire it into CI with `cilium connectivity test`. Output: (a) the default-deny + L3/L4 + L7 + toFQDNs policy set, (b) the Hubble commands to baseline and to debug a drop, (c) a NetworkPolicy→CiliumNetworkPolicy migration table, (d) a connectivity-test matrix, (e) the top eBPF-mode gotchas for my config.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Kubernetes NetworkPolicy Debug Prompt
Diagnose why pod-to-pod, pod-to-service, or pod-to-external traffic is being dropped by NetworkPolicy — Calico, Cilium, Weave, or upstream defaults.
-
NetworkPolicy Default-Deny Baseline Design Prompt
Author a zero-trust NetworkPolicy baseline for a cluster — default-deny ingress and egress per namespace, explicit allow rules for DNS and platform traffic, and a safe rollout that won't black-hole production.
-
Kubernetes CNI Plugin Selection & Migration Prompt
Choose between CNI plugins (Calico, Cilium, Weave, Antrea), plan migration, debug CNI install issues, evaluate eBPF mode.
-
Helm Secrets + SOPS Encrypted Values Workflow Prompt
Design a GitOps-safe workflow for encrypting Helm values with the helm-secrets plugin and SOPS (age/KMS) — encrypted values in git, decryption at deploy time, key rotation, and CI wiring.
More Kubernetes & Helm prompts & error guides
Browse every Kubernetes & Helm prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.