CNI IPAM + intra-node routing plugin in favor of UNIX philosophy
Switch branches/tags
Clone or download
mitsutaka Merge pull request #31 from cybozu-go/fix-for-pflag
[mtest] fix for new CKE
Latest commit c13bec3 Dec 7, 2018

GitHub release CircleCI GoDoc Go Report Card


Coil is a CNI plugin that automates IP address management (IPAM) and programs intra-node Pod routing for Kubernetes.

Coil is designed in favor of UNIX philosophy. It is not tightly integrated with routing daemons like BIRD. It does not implement Kubernetes Network Policies either.

Instead, users can choose their favorite routing daemons and/or network policy implementations for use with coil.

Project Status: All planned features are implemented.



  • IP address management (IPAM)

    Coil dynamically allocates IP addresses to Pods.

    Coil has a mechanism called address pool so that the administrator can control to assign special/global IP addresses only to some Pods.

  • Address pools

    An address pool is a pool of allocatable IP addresses. In addition to the default pool, users can define arbitrary address pools.

    Pods in a specific Kubernetes namespace take their IP addresses from the address pool whose name matches the namespace if such a pool exists.

    This way, only users who can create Pods in the namespace can use special/global IP addresses.

  • Address block

    Coil divides a large subnet into small fixed size blocks (e.g. /27), and assign them to nodes. Nodes then allocate IP addresses to Pods from the assigned blocks.

  • Intra-node Pod routing

    Coil programs intra-node routing for Pods.

    As to inter-node routing, coil publishes address blocks assigned to the node to an unused kernel routing table as described next.

  • Publish address blocks to implement inter-node Pod routing

    Coil registers address blocks assigned to a node with an unused kernel routing table. The default table ID is 119.

    The routing table can be referenced by other routing programs such as BIRD to implement inter-node routing.

    An example BIRD configuration file that advertises address blocks via BGP is available at mtest/bird.conf.


This repository contains these programs:

  • coil: CNI plugin.
  • coilctl: CLI tool to configure coil IPAM.
  • coild: A background service to manage IP address.
  • coil-controller: watches kubernetes resources for coil.
  • coil-installer: installs coil and CNI configuration file.
  • hypercoil: all-in-one binary just like hyperkube.

coil should be installed in /opt/cni/bin directory.

coilctl directly communicates with etcd. Therefore it can be installed any host that can connect to etcd cluster.

coild and coil-installer should run as DaemonSet.

coil-controller should be deployed as Deployment.


docs directory contains documents about designs and specifications.