Demystifying CNI Writing a CNI from Scratch
summary
Builds a minimal CNI as an executable placed in /opt/cni/bin and a JSON config in /etc/cni/net.d, implemented as a bash CNI that creates a veth pair, moves one end into the new network namespace, renames it to eth0, assigns IP 10.244.20/32, and adds host and container routes. The plugin prints the expected CNI JSON to stdout so the CRI accepts the result, pods get IPs and traffic (curl) works.
AI-written summary · about
chapters (11)
- 0:00CNI introduction
- 1:46CNI specification
- 6:23Linux network namespaces
- 10:00CRI invoking CNI
- 11:48Virtual Ethernet in bash
- 15:03IP assignment in namespaces
- 17:34Routing for containers
- 22:12CNI plugin config
- 24:42Test CNI with pod
- 26:08When the CNI is no longer needed
- 27:56Q&A
related talks
33mKubernetes Networking: How to Write a CNI Plugin From Scratch
40mModular Overlay Networking Solutions with the Container Network Interface
34m"My CNI Plugin Did… What?!": Debugging CNI with Style & Aplomb
37mIntroduction to CNI, the Container Network Interface Project
31mEverything You Ever Wanted to Know About CNIs (Container Network Interface) and ...
37mKubernetes and the CNI: Where We Are and What's Next - Casey Callendrello, CoreOS
27mTowards CNI v2.0
35mCNI Intro
