Go Apache-2.0

coil

CNI plugin for Kubernetes designed for scalability and extensibility

C

cybozu-go

Dernière activité 29 sept. 2026
cybozu-go/coil

177

étoiles

24

forks

14

issues ouvertes

cnikubernetesnat

Ce README est souvent en anglais.

GitHub release CI PkgGoDev Go Report Card

Coil

Coil is a CNI-based network plugin for Kubernetes.

Coil is designed with respect to the UNIX philosophy. You can combine Coil with any routing software and/or any network policy implementation.

Coil allows to define multiple IP address pools. You can define a pool of global IPv4 addresses for a small number of pods and another pool of private IPv4 addresses for the remaining pods.

There are blog articles about Coil: https://blog.kintone.io/archive/category/Coil

Status

Version 2 is generally available (GA). It conforms to CNI spec 1.1.0.

Dependencies

  • Kubernetes Version: 1.33, 1.34, 1.35

    • Other versions are likely to work, but not tested.
  • (Optional) Routing software

    • Coil has a simple routing software for flat L2 networks.
    • If your network is not flat, use BIRD or similar software to advertise the routes.

Features

  • Address pools

    Coil can have multiple pools of IP addresses for different purposes. By setting a special annotation to a namespace, you can specify a pool for the pods in that namespace.

  • IPv4/IPv6 dual stack

    In addition to IPv4-only and IPv6-only stacks, Coil can define dual stack address pools.

  • Running with any routing software

    Coil provides a simple router for clusters where all the nodes are in a flat L2 network. This router, called coil-router, is optional.

    For more complex networks, Coil exports routing information to an unused kernel routing table. By importing the routes from the table, any routing software can advertise them.

  • On-demand NAT for egress traffics

    Coil can implement SNAT on Kubernetes. You can define SNAT routers for external networks as many as you want.

    Only selected pods can communicate with external networks via SNAT routers.

  • Auto MTU configuration

    Coil detects the optimal MTU and configures MTU for container networks.

Refer to the design document for more information on these features.

Quick start

Coil can run on kind clusters using Docker.

Prepare a recent Ubuntu and install Docker and Go, then run:

$ cd v2
$ make certs
$ make image

$ cd e2e
$ make start
$ make install-coil
$ ../bin/kubectl apply -f manifests/default_pool.yaml

Now you can play with Coil.

Usage examples

Project Neco uses Coil with these software:

Coil can work with Cilium through its generic veth chaining feature.

Documentation

Installation procedures are described in docs/setup.md.

The user manual is docs/usage.md.

docs directory contains other documents about designs and specifications.

Steps for updating dependencies and supported Kubernetes versions are described in docs/maintenance.md.

Upgrade from v1

See coil-migrator.md

License

Coil is licensed under the Apache License, Version 2.0.

Projets similaires

Container Network Interface - networking for Linux containers

Gocontainersdockerkubernetes
Ccontainernetworking
6,1 k étoiles1,2 k

eBPF-based Networking, Security, and Observability

Gobpfcncfcni
Ccilium
25,6 k étoiles4,1 k

Cloud native networking and network security

Gocatscnicni-plugin
Pprojectcalico
7,4 k étoiles1,6 k