• Stars
    star
    118
  • Rank 299,923 (Top 6 %)
  • Language
    Shell
  • License
    GNU Affero Genera...
  • Created over 5 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Kubernetes networking: CNI plugin from scratch, in bash

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