Kubernetes networking with Cilium and eBPF

Cilium replaces parts of the Kubernetes data path with eBPF and adds flow visibility and identity-based policy. This page covers what it does, the trade-offs, the kernel checks and the build sequence for self-managed clusters.

On this page

Kubernetes networking with Cilium and eBPF: when a cluster needs it

A platform team should consider Cilium when it is choosing or replacing the cluster network and needs network policy that follows workload identity, flow visibility for troubleshooting and audits, and fewer iptables rules to maintain at scale. Cilium is a good fit when those three needs appear together, because it covers the data plane, policy and observability from one component. If the cluster only needs basic pod connectivity and a short list of allow rules, a simpler plugin may be enough, and the comparison with other plugins belongs in the sibling CNI selection topic.

According to the Cilium documentation, Cilium uses eBPF programs in the Linux kernel to forward pod traffic and enforce policy, instead of relying on long chains of iptables rules. It can also replace kube-proxy, which handles Service load balancing, so the data plane for Services is handled by Cilium. Hubble, its observability layer, reads flow data from the same eBPF programs and shows which identities talk to which services, and whether traffic was allowed or dropped. Policy in Cilium is written against labels and identities rather than only IP addresses, which matters when pods are rescheduled often.

The practical step is to read the Cilium system requirements for the kernel version and distribution you run, and to confirm which kube-proxy replacement modes, Hubble features and Gateway API support apply to your Cilium release. Those behaviors change between releases, so check them against the version you will deploy rather than relying on general descriptions. Plan a lab cluster that matches your node operating systems before any production change, and record the kernel and Cilium versions you validate.

Which Cilium components the cluster network depends on

Running Cilium as the cluster network is less a single install than a set of cooperating parts, each changing something different on every node. Plan for them together, because the kernel, the agent, the operator and the optional kube-proxy replacement all affect whether Services, policy and flow visibility behave as expected.

Cilium agent on every node

The Cilium agent runs on each node and programs the local data plane for pods on that node. It watches the Kubernetes API, assigns identities to workloads from their labels, and translates network policy into rules the kernel enforces. Because every node runs its own agent, a broken or outdated agent affects only that node's pods, but a version mismatch across nodes can produce inconsistent policy. Check agent health on each node during rollout and confirm the agent starts cleanly after a kernel or node image change.

eBPF data plane

Cilium loads eBPF programs into the Linux kernel to handle packet forwarding, load balancing and policy decisions, instead of relying mainly on long iptables chains. The kernel version and its enabled eBPF features set the ceiling for what Cilium can do on your nodes. Confirm the kernel requirements for your chosen Cilium release and node operating system before you build the cluster, since upgrading a kernel across a fleet is usually a larger change than upgrading Cilium itself.

Optional kube-proxy replacement

Cilium can replace kube-proxy and handle ClusterIP, NodePort and LoadBalancer Service traffic in the eBPF data plane. This removes the need to run kube-proxy, but it moves Service behavior into a component your team must operate and debug. Decide early whether kube-proxy stays, and if you replace it, rehearse node drains, NodePort access from outside the cluster and any external load balancer that relies on the previous proxy behavior.

Hubble for flow visibility

Hubble is Cilium's observability layer, which reports network flows between pods, services and external endpoints, including whether policy allowed or denied them. It is the fastest way to see why a connection fails after a policy change. Plan storage and access for flow data, because flow records can contain sensitive metadata about which services talk to which, and decide who in security and operations may query them.

Cilium operator for cluster-wide tasks

The Cilium operator handles cluster-scoped work that should not run once per node, such as IP address management tasks and certain custom resource housekeeping. Agents keep working on existing nodes if the operator is briefly unavailable, but new IP allocation and some reconciliation can stall. Confirm where the operator runs, how many replicas you deploy, and how you will monitor it, because it is easy to overlook until a scale-out or node addition fails.

Configuration options and when each fits

This table compares the main Cilium configuration choices for a self-managed cluster, with the network and kernel demands each one places on your team. Read each row as a decision: find the option that matches your routing constraints, then check what it asks of the network team and the node kernels before you commit.

OptionWhen it fitsWhat it asks of the network teamWhat it asks of the kernel and nodes
Keep kube-proxyClusters where the team wants the smallest change, or where kube-proxy behavior is already tested and documented in your environmentLittle change to routing. Existing service and node-port behavior stays as it isStandard node kernel. Confirm the kernel features Cilium needs for your chosen release before enabling any eBPF feature
Replace kube-proxy with CiliumClusters that want eBPF service handling and fewer iptables rules, and can test service traffic before cutoverTest LoadBalancer, NodePort and external traffic paths, plus any appliances that depend on kube-proxy behaviorRequires eBPF support in the node kernel. Check the kernel requirements for your release first, and plan a rollback path
Overlay routing (tunnel mode)Clusters where pod networks do not need to be routed on the physical network, or where the underlay cannot be changed quicklyLower underlay change effort. Confirm MTU, encapsulation port and firewall rules between nodesKernel must support the tunnel mode you select. Confirm MTU impact on node interfaces
Native routingClusters where the underlay can route pod CIDRs, and where teams want to avoid encapsulation overheadRoute pod CIDRs through the fabric or BGP. Requires agreed addressing and route ownershipKernel routing and forwarding must match the design. Confirm the settings for your datapath before rollout
Hubble flow visibility enabledTeams that need flow records for troubleshooting and policy verification in addition to metricsConfirm where flow data is stored and who can query it, since flow data can reveal internal service communicationAdds agent resource use on nodes. Size agents after a test run in your own environment
Hubble Relay and UIMulti-node clusters where operators want one cluster-wide view of flows through a relay and browser interfacePlan access to the UI through your identity and ingress design, and restrict it to the teams that need itRelay and UI run as workloads in the cluster. Confirm their resource needs during testing
Identity-based network policyEnvironments where policy should follow workload identity from labels, rather than changing with pod IP addressesPolicy owners need a label and namespace model agreed with platform teams. Network teams must accept that IP-based rules alone are not enoughRelies on the Cilium agent and identity allocation. Confirm the agent is healthy on every node before enforcing
IP-based network policyTraffic to external networks or fixed appliances that cannot run Cilium identitiesNetwork teams can keep familiar CIDR rules and firewall-style reviewLess dependent on identity state, but pod IP changes need rule maintenance
Gateway API support enabledClusters that want Gateway API routing through Cilium rather than a separate controllerLoad balancer addresses, DNS records and TLS certificate ownership must be agreed with the network and security teamsConfirm the Gateway API CRD versions your release expects before enabling. Test each route type you plan to use

Kernel and node requirements to check before choosing eBPF

Before you commit to a Cilium data plane, check the Linux kernel on every node that will run it. An eBPF data plane depends on kernel features: the version itself, the BPF filesystem mounted at /sys/fs/bpf, and a set of kernel configuration options that enable BPF programs, maps, cgroup hooks and the networking features Cilium uses for kube-proxy replacement. A node can boot, join the cluster and run ordinary pods while still lacking a feature that Cilium needs, so the failure often shows up later as dropped Services, missing policy enforcement or agent crash loops rather than as an obvious install error. Treat the kernel as part of the network design, not as a detail of the operating system image.

Node images are where this check most often fails. Managed node groups, hardened operating system images and appliance-style distributions may ship older kernels, disable options in the kernel configuration, mount a read-only or absent BPF filesystem, or lock down the boot parameters that Cilium depends on. Each of these choices is usually made for good security or support reasons, so the question for your team is whether the image can be changed or whether the network design has to fit the image. Confirm the minimum kernel version and required kernel options against the Cilium system requirements page for the exact release you plan to install, because these requirements change between releases and can differ when you enable features such as WireGuard encryption or the Gateway API implementation. Ask your image maintainer for the kernel version and configuration of each node pool, not only the distribution name.

Test on a representative node pool before you change the cluster. Choose nodes that match the most restrictive image in production, install the planned Cilium release with the kube-proxy replacement settings you intend to use, and run the same checks you will rely on later: Service reachability from pods, DNS resolution, a NetworkPolicy allow and deny test, and Hubble flow visibility. Record the results, including the agent status output on each node, so the decision to move to eBPF rests on evidence from your own hardware. Also plan for a rollback path, because switching the data plane on a live cluster is harder to reverse than installing it on a new cluster.

How Cilium, kube-proxy and Hubble fit on each node

The diagram starts at a client pod sending traffic to a Service on a worker node. With Cilium handling service traffic, the eBPF data plane translates the request, checks identity-based policy and forwards allowed traffic to a backend pod. The Cilium agent receives service and endpoint state from the kube-apiserver in the control plane, and flow events go to Hubble. The kube-proxy path appears only where kube-proxy is retained. Before relying on Hubble data, confirm which path carries your traffic and that the node kernel supports the eBPF features your Cilium version requires.

Pod-to-Service traffic through the Cilium data plane, with the retained kube-proxy path shown for comparison.

Build sequence for a Cilium cluster network

This sequence takes a Cilium cluster network from prerequisite checks to a verified data plane, so the team knows each layer works before adding the next. The output is a non-production cluster that passes connectivity tests, with a documented version pairing, addressing plan and baseline policy set ready to repeat in production.

  1. Confirm kernel and node prerequisites

    Before installing anything, the platform team checks the Linux kernel version, eBPF and BPF filesystem support, and the kernel options the chosen Cilium release requires on every node image, including any cloud-provided or custom images. Check the kernel requirements in the Cilium documentation for your exact release, not from memory, and confirm that node images are identical across pools. The step is done when a script run on each node reports the required kernel features as present and the results are saved with the build record.

  2. Match the Cilium release to Kubernetes

    The network team selects a Cilium release whose compatibility matrix includes the Kubernetes minor version the cluster runs or will run, and confirms that the distribution's own networking components (kube-proxy, CoreDNS and any bundled CNI) can be disabled or replaced. Kubernetes minor versions are supported for a limited window, so check the current release list before choosing both versions together. The step closes when a written version pairing exists, signed off by the people who own the cluster upgrade plan.

  3. Plan CIDRs, routing mode and IPAM

    The team writes down the pod CIDR, service CIDR, node addressing, and whether pods will use an overlay (tunnel) or native routing with the physical network. It also decides the IP address management mode and checks that the pod range does not overlap data center, VPN or cloud subnets that the cluster must reach. This is a decision record, not a configuration file: the step is complete when network engineers have reviewed the ranges and the routing choice against the firewall and BGP design.

  4. Install Cilium in a non-production cluster

    Install the chosen Cilium release in a non-production cluster that matches production node images and network layout as closely as possible. Keep kube-proxy running at this stage so that the CNI is the only change under test. Confirm the agent DaemonSet is ready on every node and that the Cilium status command reports a healthy agent and operator. The step is done when all nodes show Cilium as healthy and pods receive IP addresses from the planned pod CIDR.

  5. Enable kube-proxy replacement after service checks

    Only after pod-to-pod traffic and DNS work, the team enables kube-proxy replacement in the test cluster, removes kube-proxy, and then verifies ClusterIP, NodePort, and LoadBalancer or external IP reachability from pods and from outside the cluster. Check the Cilium status output for the kube-proxy replacement mode it reports and confirm that services behave the same as before. The step closes when every service type used by the workloads passes a manual check and the rollback procedure to restore kube-proxy has been rehearsed.

  6. Enable Hubble for flow visibility

    The team turns on Hubble, Cilium's flow observability layer, and confirms that the relay and UI or CLI can show flows between namespaces, dropped packets and DNS queries. Hubble data volume grows with traffic, so the team sets its retention and access rules before production. The step is done when a test workload's flows appear in Hubble with source and destination identity labels, and the people who will use it have access that matches the organization's data handling rules.

  7. Write baseline identity-based policies

    The team writes a small set of default policies in audit or observation first, using Cilium identity labels rather than IP addresses. Typical baselines cover default deny for selected namespaces, DNS egress to the cluster resolver, and allowed traffic between a test frontend and backend. Hubble is used to confirm which flows would be dropped before enforcement is turned on. The step closes when the policies pass review against recorded flows and have been enforced in the test cluster without breaking the expected traffic.

  8. Run connectivity tests and record results

    The team runs the Cilium connectivity test suite in the test cluster, then repeats the key checks from production-like workloads, including DNS, service access, policy denies and egress to external systems. Failures are fixed and the test is rerun from the start, not patched around. The step is complete when the full suite passes on the agreed Cilium and Kubernetes pairing and the results, versions and configuration values are stored as the baseline for production rollout and future upgrades.

Security and operational considerations for Cilium policy and visibility

Cilium policy and Hubble visibility change who can see traffic and which connections are allowed, so they need deliberate rollout and access decisions. The cards below cover the sequence for tightening policy, who gets to read flow data, the encryption and RBAC questions to settle, and how Cilium upgrades fit alongside Kubernetes version skew.

Default-allow before default-deny

Start by observing traffic with policy in audit or default-allow posture, then move namespaces to default-deny one at a time. Hubble flow records show which connections real workloads make, so policy authors can write allow rules from evidence rather than guesses. Confirm the policy audit mode and enforcement behavior for your Cilium release before the first namespace changes, because a missing allow rule breaks service traffic immediately once enforcement starts.

Kubernetes source

Who can read Hubble flow data

Hubble flows reveal pod identities, namespaces, service names, DNS queries and which workloads talk to which endpoints, which can expose internal architecture and sometimes sensitive destinations. Decide which teams get the Hubble relay, UI or CLI, and whether flow access is limited by namespace. Treat flow data as sensitive operational data and set retention and export rules before enabling it cluster-wide.

Encryption options for the chosen release

Pod-to-pod encryption in Cilium can be configured with IPsec or WireGuard, and the supported combinations, key rotation method and interaction with kube-proxy replacement vary by release. Confirm the encryption mode, key management and performance impact against the exact Cilium version you plan to run, and check whether node-to-node traffic and host-network traffic are covered. Record which traffic remains unencrypted in your design.

RBAC for policy authors

Cilium policies are Kubernetes objects, so anyone who can create or edit CiliumNetworkPolicy or CiliumClusterwideNetworkPolicy can change what traffic is allowed. Scope these permissions with Kubernetes RBAC so application teams manage policy only in their namespaces, while cluster-wide policy stays with the platform team. Review who holds rights to edit the Cilium configuration itself, since that controls the data plane for every workload.

Secrets good practices

Upgrade ordering with version skew

Cilium upgrades must fit inside the Kubernetes version skew rules: kube-apiserver is upgraded one minor version at a time before the kube-controller-manager, kube-scheduler and kubelets, and kubelets may be up to three minor versions older than kube-apiserver. Plan the Cilium upgrade path against the Kubernetes minor version in each step, and check the Cilium compatibility matrix before moving either component. Use a lab cluster to rehearse the sequence.

Kubelet minor versions
3
Version skew policy

Pod security context as policy input

Kubernetes Pod Security Standards define Privileged, Baseline and Restricted profiles enforced per namespace, and they set the baseline for what workloads may do on the node. Cilium policy governs network paths, not pod privileges, so the two controls should be designed together. Use the Pod Security Standards as context for namespace classification, and confirm separately which Cilium features require privileged or host-level capabilities in your deployment.

Pod Security Standards

Limits to confirm in your environment before rollout

Does Cilium kube-proxy replacement work with our existing load balancers?

It depends on how your load balancers reach node ports and service addresses, so confirm this with the team that owns your load balancers before rollout. Cilium can replace kube-proxy, but the load balancer integration path (direct to pods, NodePort, or external IP announcement) must be checked against your design. Ask your network team which traffic flows enter the cluster, which health check paths they use, and whether any appliance expects specific source address behavior. Test each flow in a staging cluster with the same kernel and Cilium settings you plan to run in production, and record what changes compared to kube-proxy.

Which Gateway API version and features does our Cilium release support?

Check the Gateway API support table in the Cilium release you intend to install, because support varies by Gateway API version and by individual resource fields. Confirm which GatewayClass, HTTPRoute, TLS and policy resources your applications use, then compare them against the documented support for your exact release. Also confirm which Gateway API CRD version your cluster must install first, since mismatched CRDs are a common cause of failed reconciliation. Ask your platform vendor or Cilium's maintainers in writing for any feature you depend on that is marked partial or unsupported.

How will Cilium work alongside our existing mesh or ingress controllers?

Map every component that handles traffic, policy or identity before choosing how Cilium interacts with them. If you run a service mesh, ingress controller or another CNI feature that also manages L7 routing, mTLS or network policy, document which component owns each decision and where they could conflict. Confirm the supported combinations for your Cilium version, including whether any mesh requires specific Cilium settings. Ask the owners of each component to review the design, and run a test that exercises the full request path, not only pod-to-pod traffic.

Does Cilium support our Windows worker nodes?

Confirm Windows node support in the Cilium documentation for your exact release before assuming any Windows workload can use it. If your cluster includes Windows nodes, the networking, policy and kube-proxy behavior on those nodes may differ from Linux nodes, and some features may be unavailable. Ask your Cilium support contact or the vendor that supplies your distribution which Windows versions and features are covered. If Windows is required and support is unclear, plan a separate evaluation of the CNI options before committing to a single cluster design.

How much CPU and memory does Hubble add to our cluster?

Hubble resource use depends on flow volume, retention settings, the number of nodes and how many clients read flows, so measure it in your own environment rather than relying on a general figure. Enable Hubble in staging with traffic that resembles production, then track agent and relay resource use, and check the flow buffer and export settings you plan to use. Ask the team responsible for observability what retention and query load they expect. Set resource limits and alerts before production, and review them after your first full business cycle.

What kernel version and BPF features must our nodes have?

Check the kernel requirements in the Cilium documentation for your release and compare them with the kernel and distribution versions on every node pool. Some features, such as specific eBPF capabilities or kube-proxy replacement modes, depend on newer kernel support. Ask your operating system or node image owner whether the required options are enabled, and confirm that managed or hardened images do not disable them. Verify node by node, because mixed node pools are a frequent source of unexpected behavior.

Who should sign off on the Cilium network design before rollout?

Sign-off should come from the network, security and platform teams together, because Cilium changes routing, policy and observability at once. The network team confirms load balancer and upstream routing, the security team reviews identity-based policy and flow logging, and the platform team owns the install, upgrades and rollback. Agree on who approves changes to policy and Hubble settings after go-live. Put the decisions and open items in writing so that the rollout has a named owner for each limit listed here.

How DeployOpen scopes and delivers Cilium networking

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure, including Kubernetes clusters in their cloud accounts, data centers or air-gapped networks. For Cilium, that means the network design, kernel checks, rollout and verification are agreed in writing before work starts.

How we scope

  • Confirm the node kernel versions, distribution and whether kube-proxy replacement is in scope before any change is planned.
  • Record which NetworkPolicy, identity-based policy, Hubble and Gateway API features the written scope includes.
  • Agree in writing how the migration from the current CNI will be sequenced, tested and rolled back if needed.

How we build

  • Install and configure Cilium on a non-production cluster first, then verify pod networking, service routing and DNS.
  • Write policy in stages, starting with observed Hubble flows so default-deny rules do not block legitimate traffic.
  • Test Gateway API routes, TLS termination and failure behavior against the agreed design before production cutover.

How we hand over

  • Deliver the Helm values, policy repository, kernel and node prerequisites, and a record of every design decision.
  • Document the runbook for upgrades, policy changes, Hubble access and troubleshooting dropped flows.
  • Provide a verification checklist your own team can rerun after changes, with the results of the acceptance tests.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover, scoped separately from the build.
  • Retest network policy and exposed services after cluster upgrades, new workloads or changes to the Cilium version.
  • Ask any provider to confirm response scope, upgrade stops and staffing in the quote, since these vary by engagement.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.