Skip to content

Kubernetes networking: CNI plugin from scratch, in bash

License

Notifications You must be signed in to change notification settings

fishingfly/cni-from-scratch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes networking: Writing a CNI plugin from scratch

This repository holds the complete implementation of the examples seen in Kubecon Barcelona talk, 2019.

Kubernetes networking: Writing a CNI plugin from scratch / Eran Yanay — Video | Slides ]

Prerequisits

  • Two node K8s cluster. Kubeadm works just fine.
  • Nodes IPs should be hardcoded into init.sh
  • demo.yaml nodeSelector should be modified according to your cluster node names
  • Modify 10-my-cni-demo.conf, with podcidr field to correspond to the specific node pod cidr range. Can see podcidr range by running kubectl describe node. This should be modified for every node

Installation

Deploy into a K8s cluster by following the next steps:

  1. Copy my-cni-demo to /opt/cni/bin/my-cni-demo
  2. Copy the modified config file to /etc/cni/net.d/
  3. Copy the modified init script to each node, and run it at least once after restart. The changes it perform are not persistent.

Usage

Apply the demo config yaml by running kubectl apply -f demo.yaml

About

Kubernetes networking: CNI plugin from scratch, in bash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%