Kubernetes networking and network policy with Calico

Calico Open Source provides pod networking and NetworkPolicy enforcement for self-managed Kubernetes. This page covers the routing, IPAM and data plane decisions, the setup sequence, and what changes if you move to Calico Enterprise or Calico Cloud.

On this page

When teams choose Calico for Kubernetes networking and network policy

Calico Open Source provides pod networking and enforces Kubernetes NetworkPolicy in a self-managed cluster, and it also supports the wider Calico policy model for teams that need rules beyond namespace scope. Choose it when your cluster needs a CNI plugin that can enforce network policy, you want the networking and policy engine to run entirely in infrastructure you control, and your team is prepared to operate a routing layer. Calico is a strong fit when your network team already thinks in terms of BGP peering with top-of-rack switches or core routers, because Calico can advertise pod routes directly instead of wrapping every packet in an overlay. It is a weaker fit when the cluster is small, flat and short-lived, where a simpler plugin such as Flannel may be enough, though Flannel does not enforce NetworkPolicy on its own. Compare the options on the criteria that matter to you: policy enforcement, encryption, observability, Windows node support and what your chosen distribution already bundles.

The decision turns on a few concrete questions. First, does your underlay allow you to peer BGP sessions from nodes, or would an overlay such as VXLAN or IP-in-IP be simpler to operate through existing firewalls and cloud routing? Second, will you need global network policies that apply across all namespaces, such as a default deny baseline or rules for host endpoints, or are namespace-scoped NetworkPolicy objects sufficient? Third, do you plan to use the eBPF data plane, and does your kernel and distribution support it? Calico's documented capabilities change between releases, so confirm each feature you depend on against the Calico documentation for the exact version you intend to install, including IPAM options, encryption, and any dependency on kube-proxy behavior. Also confirm the license terms and which features are restricted to Calico Enterprise or Calico Cloud, because moving to either later changes the operating model, not only the feature list.

Calico configuration options and when each fits

This table compares the main Calico configuration choices: overlay versus BGP routing, IPAM pool design, and the iptables versus eBPF data planes. Read each row as a decision: the first column names the choice, the other columns show what it costs to operate and what the network team must supply before you commit.

ChoiceOperational trade-offMTU and troubleshooting effortWhat the network team must provide
Overlay (VXLAN)Pod traffic is encapsulated, so the physical network does not need to learn pod routes. Setup is simpler and works across most L3 fabrics.Encapsulation adds header overhead, so node and pod MTU must be lowered to match. Packet captures show outer headers, which slows diagnosis.Confirm the underlay MTU and that UDP encapsulation traffic is permitted between nodes and through firewalls.
Overlay (IP-in-IP)Similar to VXLAN with less encapsulation overhead, but it uses IP protocol 4, which some firewalls and cloud networks block by default.MTU planning is still required. Blocked protocol 4 traffic often appears as intermittent pod-to-pod failures.Confirm protocol 4 is allowed between nodes and that security groups or firewall rules match the node subnets.
Native BGP routingPod CIDRs are advertised to the physical network, so no encapsulation is needed. Routes must be maintained through peering sessions and route filters.No encapsulation overhead, so MTU follows the underlay. Route withdrawals and missing advertisements are the usual failure points.A BGP peering model (top-of-rack, route reflectors or full mesh), AS numbers, and agreement on which pod prefixes may be advertised.
IPAM pool designPools define which CIDRs pods receive, whether they are encapsulated, and which nodes draw from them. Changing a pool later is disruptive, so the plan should be set before the first workloads run.Overlapping pod CIDRs with corporate or VPN ranges cause routing failures that look like application faults. Block sizing determines how many pods each node can host.Unused, non-overlapping address ranges for pod CIDRs, plus confirmation that those ranges are not routed elsewhere in the enterprise.
Standard iptables data planeMature, widely documented and familiar to most operations teams. Rule counts grow with the number of policies and services, which makes large clusters harder to debug.Rules are inspected with iptables tooling. Standard MTU and overlay settings apply unchanged.Nothing beyond the node and kernel baseline, but confirm the kernel and iptables mode your distribution ships.
eBPF data planeReplaces iptables with eBPF programs and can remove kube-proxy from the datapath. Operators need to learn new tooling and check kernel support before adopting it.Troubleshooting relies on Calico and eBPF-specific tools. Interactions with existing kube-proxy, NodePort and firewall rules must be tested.Kernel versions that meet Calico's eBPF requirements, a change window for moving existing clusters, and firewall rules that account for eBPF traffic handling.
Choosing between data planes after installationSwitching data planes on a running cluster is a planned migration, not a setting change. Treat it as a project with a rollback plan.Each switch needs regression testing of services, policies and node networking.Maintenance windows, a test cluster that mirrors production networking, and sign-off from the team that owns the firewalls.

Setup sequence for Calico on a self-managed cluster

This sequence takes a self-managed Kubernetes cluster from a version and address plan to a working Calico data plane with default-deny policy in place. Each step closes with a check, so the team knows whether to continue or fix the step before moving on.

  1. Confirm Kubernetes and Calico version compatibility

    The platform engineering lead checks the Kubernetes minor version on the cluster against the Calico release notes and the Calico system requirements for the chosen release, including the Linux kernel version on each node if the eBPF data plane is under consideration. Confirm the target versions with the Calico project and record them in the change plan, along with the version skew rules that apply to the control plane and kubelets. Done when the team has a written pairing of Kubernetes and Calico versions, and every node image meets the stated kernel and iptables or nftables requirements.

  2. Plan pod and service CIDRs and node addressing

    The network architect allocates the pod CIDR, service CIDR and node subnets so they do not overlap with each other, with existing data center ranges, VPNs or peered cloud networks. Decide how much address space each node receives for pods and whether the plan must be extended later. Ask the Calico project documentation how IP pools are defined and whether they can be changed after installation. Done when a reviewed address table exists and the network team has confirmed there are no conflicts with routed networks.

  3. Choose overlay or BGP routing for the pod network

    The architect selects encapsulation (VXLAN or IP-in-IP) when the underlay cannot learn pod routes, or BGP peering when the top-of-rack switches or routers accept sessions from the nodes and the network team can manage route advertisement. Overlay is simpler to start with because it needs no network changes, but it adds encapsulation overhead and makes pod traffic harder to see on the underlay. BGP keeps pod addresses routable but requires agreed AS numbers, peering configuration and route filters. Done when the routing mode is recorded in a decision note signed off by both the platform and network teams.

  4. Stage the Calico images in a private registry

    For air-gapped or restricted sites, the platform engineer mirrors every Calico image and the Kubernetes control plane images into an internal registry. The Kubernetes side uses kubeadm config images list and kubeadm config images pull, then points kubeadm init at the internal registry with --image-repository. Calico manifests or the Tigera operator configuration must reference the same internal registry. Done when every image in the manifest pulls successfully from a node with no internet route, and the image digests are recorded in the change record.

  5. Install Calico and confirm node readiness

    The platform engineer applies the Calico installation method chosen for the release, with the IP pool, routing mode and CIDRs from the earlier steps. Verify that the calico-node pods run on every node, that IP pools match the planned CIDRs and that the nodes report Ready. Test pod-to-pod connectivity across two nodes before any policy is applied. Done when all calico-node pods are running, every node is Ready, and a test pod on one node reaches a test pod on another node by IP.

  6. Apply default-deny and baseline namespace policies

    The security engineer applies a default-deny ingress and egress policy to a pilot namespace, then adds explicit allow rules for DNS, the API server and the application flows that the team has documented. Global network policies can carry cluster-wide baseline rules, such as allowing DNS to CoreDNS or blocking access to node metadata endpoints, so they are not duplicated per namespace. Roll the same pattern out to further namespaces only after the pilot works. Done when the pilot namespace blocks unlisted traffic and the documented flows still work.

  7. Verify policy enforcement with test pods

    The security or platform engineer runs a scripted set of test pods in the pilot and a second namespace. The tests should cover allowed flows, denied flows across namespaces, denied egress to external addresses, and traffic to Services and DNS. Keep the test manifests in version control so they can be rerun after upgrades. Done when every allow and deny test returns the expected result, and the results are saved with the Calico and Kubernetes versions recorded.

  8. Record the configuration and confirm the upgrade path

    The platform team stores the Calico manifests, IP pool definitions, routing decisions and policy sets in version control, and documents who owns each change. They also confirm, against the Calico upgrade documentation, how the team will move to a later release in step with Kubernetes upgrades. Ask the vendor or project whether the chosen features, such as the eBPF data plane or observability tooling, are in the open source edition or require a commercial product. Done when the repository holds the full configuration and an upgrade checklist is approved.

How Calico enforces policy across nodes

Calico extends the standard Kubernetes NetworkPolicy model in two ways that change how you design rules. Its own policy objects add global network policies that apply across all namespaces or to non-pod endpoints such as host interfaces, which is where cluster-wide baselines like default-deny and egress restrictions to corporate ranges belong. Namespaced policies still handle team-owned rules. On every node, the Calico node agent (Felix) reads these objects from the Kubernetes API, computes which endpoints each rule selects, and programs the data plane locally, so enforcement does not depend on a central controller being in the packet path. Confirm which policy tiers and ordering features your Calico release supports in the version you plan to run, and check the current Calico documentation before you write the tier model.

The trust boundary sits in three places, and each needs its own rules. Pod-to-pod traffic is controlled by workload policy. Traffic to and from the node itself, including kubelet, SSH and any host-level services, is controlled by host endpoint policy, which is easy to omit and can lock nodes out if applied carelessly. Traffic leaving the cluster into your network team's routers and firewalls is governed by their devices, so the rules you write in Calico must agree with what they permit, particularly when BGP peering or source address handling is involved. Agree with the network team in writing which side enforces which flow, and record it in the design.

Do not assume how policies combine. Evaluation order across tiers, the effect of an allow in one policy on a deny in another, and how label selectors match pods that are created, relabeled or moved between nodes all need testing. Build a lab cluster, apply your global baseline and a namespace policy, then verify with real connection attempts from pods, from nodes and from outside the cluster, including after a pod restart and a node drain. Keep those test cases in version control so they run again on every Calico upgrade and every change to a shared selector.

Calico's control path stops at each node's data plane, and BGP is the only link into the physical network

The diagram starts at the Kubernetes API server, where NetworkPolicy and Calico resources are stored. Felix on each worker node watches that state and programs the node's data plane, which is the point where policy is enforced for pod traffic. Felix also passes route information to BIRD, which can peer over BGP with top-of-rack routers in the physical network. The subgraphs mark where cluster, node and network responsibilities change hands. Before go-live, confirm which path your pod traffic takes, since overlay encapsulation and BGP peering each need separate approval from your network team.

Calico components on one node and the path into the physical network.

Security and operational considerations for Calico policy

Calico policy changes what traffic reaches pods, nodes and the control plane, so the risks sit in the rollout order, the people who can change policy and the way policy behaves across upgrades. The cards below cover the checks that connect those areas and that a team should agree on before the first default-deny policy reaches a production namespace.

Default-deny rollout without breaking DNS

A default-deny policy that omits DNS, API server and kubelet traffic often breaks workloads in ways that look like application faults. Before enforcing, list the egress paths each namespace needs: CoreDNS on UDP and TCP port 53, the kube-apiserver endpoint on port 6443 and any node-local services. Roll policies out namespace by namespace, starting with a non-critical workload, and keep a documented rollback that removes only the new policy objects. Test each rule with a real pod, not only by reading the YAML.

Pod Security Standards

Least-privilege RBAC over Calico resources

Calico policy objects are Kubernetes-style resources, so anyone with write access to them can open or close traffic for a whole cluster. Restrict create, update and delete on network policy and Calico global policy resources to a small platform group, and separate read access for application teams who need to review rules. Confirm the exact API groups and resource names for your Calico version before writing Roles, because the cluster-scoped objects need ClusterRoles and are easy to over-grant.

Kubernetes authentication

Protecting host endpoints and node ports

Policy that covers pods alone can leave the node itself open, including SSH, the kubelet port and NodePort services that expose workloads on every node address. Decide which host interfaces Calico should police, and write host-level rules only after you have listed the management, monitoring and cluster traffic that must still reach each node. Confirm with your Calico release notes how host endpoint policy interacts with NodePort traffic and with the node's own firewall tooling before you enable it.

Audit and flow visibility

Policy you cannot observe is hard to debug and harder to prove during an assessment. Decide which denied and allowed flows you need to retain, where flow logs go, and who reviews them. Check whether your Calico install includes flow logging in its open source build or depends on a commercial component, and confirm retention and storage sizing with your logging platform. Connect Kubernetes audit logs for changes to policy objects, so each rule change has an author and a timestamp.

Policy-as-code in Git

Keeping policies in a Git repository gives reviewers a diff for every change and a history that auditors can sample. Store global and namespaced policies as manifests, require peer review for changes to shared tiers, and apply them through a controlled pipeline rather than by hand. Add a validation step that rejects manifests which select every pod or remove DNS egress, because those mistakes are easy to make and hard to spot in review.

Upgrade testing of policy behavior

Calico upgrades and Kubernetes minor-version upgrades can change how policies are enforced, how host endpoints behave or which data plane settings are valid. Before each upgrade, run a fixed set of allow and deny tests in a staging cluster that mirrors production policies, covering DNS, service-to-service traffic, ingress and egress to external systems. Record the results so the team can repeat them after the upgrade. Kubernetes minor releases follow a supported window, so plan the Calico version against the Kubernetes versions you run.

Version skew policy

What moves to Calico Enterprise or Calico Cloud

Staying on Calico Open Source keeps the network plugin, policy engine and data plane under your team's control, with no separate commercial tier to license. Your platform team installs, upgrades and troubleshoots Calico, and it builds the visibility and alerting around it. Teams usually choose this path when the standard Kubernetes and Calico policy APIs meet their requirements and they have the staff to run them.

  • Policy as code: Network policies and global network policies live in your repositories and are versioned with the rest of your cluster manifests.
  • Operations you carry: Upgrades, IP address planning, BGP peering and failure response stay with your team and its runbooks.
  • Visibility you assemble: Flow data and dashboards come from tools you select and run, such as the metrics and logging stack you already operate.
  • Support you arrange: Community resources and your own escalation paths replace a vendor support contract, so confirm which support options apply to your installation.

Check with your auditors whether the evidence you can produce from open-source components alone meets their requests, because that answer decides whether this path stays viable as your controls mature.

Limits to confirm in your environment before committing to Calico

Calico behaves differently depending on your kernel, node operating system, MTU, existing proxy and load balancer layer, and Windows footprint. Each item below is a confirmation step to run against your target Kubernetes version and your own hardware before the design is approved.

Kernel and node OS for eBPF

The eBPF data plane depends on kernel features that vary by distribution and version, so the node image you plan to run may not qualify. Ask the Calico project for the current kernel and node OS requirements for the release you intend to deploy, then test on the exact image your nodes boot from. Confirm that your hardening baseline does not disable the kernel features the data plane needs.

Kubernetes repository

MTU and encapsulation overhead

Overlay encapsulation adds bytes to every packet, and a mismatched MTU shows up as stalled large transfers rather than clean errors. Compare the MTU of your physical network, your overlay setting and any tunnel or VPN between sites. Confirm the overhead figure for your chosen encapsulation mode in the Calico documentation for your release, and test large payloads across nodes and to external services.

Interaction with kube-proxy and load balancers

Calico's eBPF mode can replace kube-proxy, which changes how Service traffic is handled and what your load balancer sees as the client address. Confirm whether your distribution already runs kube-proxy, whether your bare metal or cloud load balancer supports the source IP behavior you need, and how health checks reach node ports. Plan the cutover so that Service behavior is verified before workloads move.

Windows node support

If any worker nodes run Windows, confirm that the Calico release you select supports Windows dataplane and policy features for the specific Windows Server version and feature set you need. Some capabilities available on Linux nodes may be missing or differ on Windows. Ask for a written support matrix and test NetworkPolicy behavior on a Windows node before you rely on it for isolation.

IPv6 and dual-stack status

Dual-stack support depends on the Kubernetes version, the Calico release, and the features you enable, and it affects IPAM pools, policy rules and load balancer behavior. Confirm which Kubernetes minor version you will run, as Kubernetes only maintains a limited set of recent minor releases, then check the Calico IPv6 status for that exact combination. Write down any feature you need that is marked as limited or unsupported.

Kubernetes releases

Open source versus vendor support scope

Calico Open Source receives community support, while features such as advanced policy management, observability and certain data plane options are offered in Calico Enterprise or Calico Cloud. Ask your vendor or the Calico project which capabilities and fixes fall under each support contract, and who is responsible for security patches. Record the answer before you design policies that depend on features outside the open source scope.

Questions buyers ask about Calico networking projects

What drives the cost of a Calico networking build?

The main driver is how many clusters, environments and network zones the Calico design must cover, plus how many existing workloads already rely on policy that will be translated. Cost usually splits into design work (routing model, IPAM, address plan, policy model), build and validation in your environment, and knowledge transfer. Recurring costs sit mostly with your team: upgrades that follow the Kubernetes version skew rules, policy changes and monitoring. Ask any partner for a written scope that lists each cluster, the routing mode for each one, the number of policy sets to be written and tested, and who runs the cutover window, so the quote can be compared line by line.

How long does a scoped Calico engagement usually take?

No duration figure is supplied for this topic, so treat any number you hear as unverified. Duration depends on the number of clusters, whether the routing model needs changes to top-of-rack or core switches, how many namespaces need default-deny policies, and how quickly your change board approves a maintenance window. A single lab cluster with overlay networking moves much faster than several production clusters that peer over BGP with network hardware you do not own. Ask for a timeline that separates design sign-off, lab validation, pilot cluster and production rollout, with each gate tied to a named approver.

What does the work need from our network and security teams?

Calico changes how packets leave and enter nodes, so the network team has to agree on the pod and service address ranges, whether BGP peering with physical routers is allowed, and how MTU and encapsulation interact with existing links. The security team owns the policy intent: which namespaces are isolated, which flows must stay open to logging, DNS and monitoring, and how exceptions are approved. Both teams should review the policy model before rollout, because a default-deny change applied without a flow map is the most common way to cause an outage. Agree early on who can approve policy changes after go-live.

Can our internal platform team install and run Calico on its own?

A team with strong Kubernetes networking experience can install Calico Open Source and manage it without a partner, using the project's documentation and its own lab. The harder part is not installation but the decisions around routing mode, IPAM ranges, policy design and testing against real traffic. Teams that have not run BGP peering or written global network policies often benefit from an outside review of the design before production. Whichever path you choose, assign named owners for upgrades, for policy review and for on-call troubleshooting of dropped flows, since those tasks recur after the project ends.

How does the Calico choice affect a later move to another CNI?

Changing the CNI on a running cluster is disruptive because pod addressing, routes and policy objects are tied to the plugin. Calico-specific resources such as its own policy kinds and IPAM pools will need to be exported, translated or removed, and workloads usually have to be restarted onto the new network. Keeping policy expressed mainly in standard Kubernetes NetworkPolicy objects and documenting your IP pools makes a later move easier. Ask any partner to include a written exit note in the design that lists the Calico-specific objects in use, so the cost of changing plugins is known before it is needed.

When should we choose overlay networking instead of BGP routing?

Overlay networking encapsulates pod traffic between nodes and works without changes to your physical network, which suits clusters where the network team cannot peer with routers. BGP routing advertises pod routes to the underlay, avoids encapsulation overhead and makes pod IPs directly routable, but it needs agreement from network engineers and a clear address plan. The decision also affects troubleshooting: overlay issues often show up as MTU or encapsulation problems, while BGP issues show up in route tables and peering state. Confirm the supported modes for your Calico version and the MTU your underlay carries before you commit.

Does Calico's eBPF data plane need a different kernel or support plan?

The eBPF data plane is an option you enable in place of the default iptables data plane, and it has kernel and feature requirements that must be checked against each node image before rollout. Your operating system team should confirm the kernel version, the availability of required kernel features and whether any node tooling depends on iptables rules. Test on one node pool first, measure policy enforcement and service handling, and keep a rollback path. Confirm current requirements in the Calico documentation for your release, since they change between versions, and ask whether the feature set you need is in Calico Open Source or in a commercial tier.

Official Kubernetes sources to read alongside this page

Read the Kubernetes version skew policy before you plan any Calico upgrade. Calico runs as pods and a node agent on every node, so the Kubernetes version your control plane and kubelets run determines which Calico release you can move to and in what order. The policy requires kube-apiserver to move one minor version at a time, ahead of kube-controller-manager, kube-scheduler and kubelets, and allows kubelets to lag the API server by up to three minor versions. Check the supported Calico and Kubernetes combinations in the Calico documentation, then write the node upgrade sequence against the Kubernetes version skew policy so the CNI is never the component left behind.

The kubeadm high availability guide shapes the topology decisions that Calico depends on. It describes stacked etcd and external etcd layouts, a minimum of three control plane nodes, and a TCP load balancer in front of kube-apiserver on port 6443. Your choice of topology affects how BGP peers are placed, whether route reflectors are needed, and which nodes must reach the API server during a Calico rollout. Confirm the load balancer address and health checks before you apply any global network policy, because a policy that blocks control plane traffic is hard to recover from remotely.

Finally, check the CNCF Certified Kubernetes conformance page before you accept a distribution that bundles Calico. Conformance confirms that a distribution supports the required Kubernetes APIs, but it does not certify the CNI plugin, its data plane choice or its NetworkPolicy behavior. Ask the distribution vendor which Calico version it ships, whether it supports the eBPF data plane, and how it handles upgrades of the CNI. The CNCF software conformance page is the right starting point for that question, and the answers belong in your written scope.

How DeployOpen scopes and delivers Calico networking work

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure, including Kubernetes networking and network policy with Calico. Each engagement starts from a written scope so the network design, policy model and handover are agreed before any cluster is changed.

How we scope

  • Inventory your cluster CIDRs, node network topology and whether BGP peering with network teams is possible
  • Agree whether the overlay or native routing model fits your existing network and firewall rules
  • Define the NetworkPolicy and GlobalNetworkPolicy baseline, default-deny stance and namespace ownership model
  • Set the written scope, deliverables and timeline in advance, since most engagements are fixed-scope

How we build

  • Install Calico Open Source with the IPAM, encapsulation and data plane options agreed during scoping
  • Validate pod-to-pod, pod-to-service and node-to-pod traffic in a non-production cluster before rollout
  • Apply global policies in staged modes so allowed and denied flows are observed before enforcement
  • Test policy behavior against your applications and confirm that the eBPF data plane choice is compatible with your kernels

How we hand over

  • Document the chosen routing model, IP pools, encapsulation settings and the reasons for each decision
  • Deliver policy-as-code in your Git repository with a review process your platform team can run
  • Provide runbooks for adding namespaces, changing IP pools and diagnosing dropped traffic
  • Walk your engineers through the handover so they can operate Calico without outside help

How we support

  • Plan Calico version upgrades against the Kubernetes version your clusters run and the skew policy in place
  • Offer ongoing support, upgrades and continuous testing as a retainer after handover
  • Retest network policy after cluster upgrades, node changes or new workloads are added
  • Scope questions about Calico Enterprise or Calico Cloud separately, so features and licensing are confirmed in writing first

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.