Self-hosted service
containernetworking/cni avatar
containernetworking/cni

containernetworking/cni: a deliberately narrow spec and Go library, not a network you can install

Container Network Interface - networking for Linux containers

6,159 stars1,161 forksGoApache-2.0

At a glance

What is it?
containernetworking/cni holds the Container Network Interface specification, the libcni Go library and the cnitool example, while the actual plugins live elsewhere. Its narrow scope is why so many runtimes adopt it, and why it cannot answer policy or plugin choice for you.
Who is it for?
Read this repository if you are writing a runtime that must call network plugins, writing a plugin, or auditing what the CNI contract actually promises. Do not expect it to give a working cluster network or to help you pick between Calico, Cilium and the rest.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 20 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • containernetworking/cni6,159 ★ · +38
Star history
Repository2026-09-232026-11-15
containernetworking/cni6.1k6.2k

38 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

CNI only promises connectivity and cleanup on delete

The scope statement is short: CNI concerns itself only with network connectivity of containers and removing allocated resources when the container is deleted. The project credits that focus for the wide support it has and for a specification that is simple to implement.

The consequence is a clear division of labour. The interface says how a runtime asks a plugin to attach a container to a network and how it asks the plugin to release what it allocated. It does not say how traffic is filtered, shaped or balanced. Those features come from whichever plugin you choose, which is why the ecosystem list names plugins such as Cilium with eBPF and XDP, Calico as a layer 3 virtual network, and Kube-OVN with subnets, static IPs, ACLs and QoS. If a feature is missing, the answer is usually in a plugin, not in this repository.

This repository holds the contract, not the reference plugins

The repository contains the specification in SPEC.md, the Go source of a library for integrating CNI into applications called libcni, and an example command line tool called cnitool for executing CNI plugins. The reference plugins and a template for making new ones sit in a separate repository, github.com/containernetworking/plugins.

That split catches newcomers. Cloning this repository will not give you a bridge or loopback plugin to try. If you want a working network you start from the plugins repository, and if you want to read the rules plugins must follow you start here.

The template exists to make it straightforward to build a plugin for an existing container networking project, and the project adds that CNI is also a good framework for starting a new container networking project from scratch.

libcni is the piece a runtime actually links against

libcni is the Go library for integrating CNI into applications. A container runtime or orchestrator that wants to invoke plugins can use it instead of reimplementing the call conventions from the spec. cnitool, in its own directory, shows how to drive plugins from the command line, which makes it the quickest way to see a plugin respond without a full runtime.

The release tags reflect that library role. One of the three most recent releases is titled libcni v1.2.3, dated 2024-07-22, while the other two, v1.3.0 on 2025-04-07 and v1.3.1 on 2026-09-03, carry plain version titles. So the library is versioned and tagged as something other programs depend on.

If your runtime pins an older libcni, check the tag notes before assuming a bug fix is in your build.

Go 1.21 and a small dependency set, including OpenTelemetry

go.mod declares module github.com/containernetworking/cni with go 1.21. Direct requirements are ginkgo v2.20.1 and gomega v1.34.1 for tests, cobra v1.9.1 for the command line, vishvananda/netns v0.0.4 for network namespaces, and go.opentelemetry.io/otel and otel/trace at v1.29.0.

The presence of the OpenTelemetry packages means tracing is a dependency of the module, so anyone vendoring libcni pulls them in. The netns dependency fits the problem space, since container networking is about moving interfaces between namespaces.

The indirect list adds logr, pflag, yaml.v3 and golang.org/x packages. The cost for an embedder is a Go toolchain at 1.21 or newer and the transitive modules, which is worth checking against your own go.mod before upgrading libcni.

Releases are sparse, and the gap before v1.3.1 was seventeen months

Three recent releases are listed: v1.2.3 on 2024-07-22, v1.3.0 on 2025-04-07 and v1.3.1 on 2026-09-03. Between v1.3.0 and v1.3.1 there is a gap of about seventeen months. The last push is 2026-10-26 and the repository is not archived, so work continues on main.

For a specification repository a slow release rhythm is not alarming, because the contract is meant to change rarely. The consequence is on your side: a fix merged to main may wait a long time for a tag, so if you need a specific change you may have to build from main or wait.

The repository also carries RELEASING.md and ROADMAP.md, which are the places to look for how a release is cut and what comes next. License is Apache-2.0.

Many runtimes use it, and the repository does not choose a plugin for you

The adopters list names Kubernetes, OpenShift, Cloud Foundry, Apache Mesos, Amazon ECS, Singularity and OpenSVC as container runtimes using CNI. The third party plugin list runs much longer, covering Calico, Contiv, SR-IOV, Cilium, Multus, Romana, CNI-Genie, Nuage, Linen, Vhostuser, Bonding CNI, ovn-kubernetes, Contrail and TungstenFabric, Knitter, DANM, Terway, Cisco ACI, Kube-OVN, Antrea, Azure CNI, Hybridnet and Spiderpool.

None of that is ranked. The project makes no claim about which plugin is best for Kubernetes, and each entry has its own purpose, for example Multus as a multi plugin, Bonding CNI for link aggregation and failover, and DANM for telco workloads on Kubernetes.

The honest consequence is that choosing a plugin is your task. Evaluate the plugin repository you are considering, not CNI itself.

Governance is open: biweekly calls, a DCO and no build target beyond lint

The project is a Cloud Native Computing Foundation project and runs a biweekly meeting on Jitsi on Mondays at 10:00 US/Eastern, with notes kept in a separate meeting-notes repository. Maintainers also presented Introduction to CNI and a CNI deep dive at KubeCon/CloudNativeCon 2019, and recordings are linked.

Contribution paths are spelled out in CONTRIBUTING.md, and the repository includes a DCO file, GOVERNANCE.md, MAINTAINERS and CODE-OF-CONDUCT.md. The Makefile is a single line that includes mk/lint.mk, so the Makefile itself offers a lint target rather than a build pipeline.

For a contributor the practical effect is that sign-off rules apply to commits, and that you should read CONVENTIONS.md and CONTRIBUTING.md before sending a patch.

Editorial conclusion

Read this repository if you are writing a runtime that must call network plugins, writing a plugin, or auditing what the CNI contract actually promises. Do not expect it to give a working cluster network or to help you pick between Calico, Cilium and the rest. Before depending on it, check the SPEC.md version your plugins implement and the libcni tag your runtime builds against.

Frequently asked questions

What does CNI stand for?

CNI stands for Container Network Interface. It is a Cloud Native Computing Foundation project made of a specification and libraries for configuring network interfaces in Linux containers.

What is CNI and how is it used in Kubernetes?

Kubernetes is listed among the container runtimes that use CNI, which defines how a network plugin connects a container to a network and releases its resources on delete.

Which CNI plugin is best for Kubernetes?

The containernetworking/cni repository does not rank plugins. It lists third party options such as Calico, Cilium, Multus, Antrea and Kube-OVN, each with its own focus.

Official sources

  1. containernetworking/cni on GitHub
  2. License: Apache-2.0
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/containernetworking-cni.svg)](https://hysenlabs.com/projects/containernetworking-cni)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/containernetworking-cni.svg)](https://hysenlabs.com/projects/containernetworking-cni)

Was this useful?