Giter VIP home page Giter VIP logo

cni-from-scratch's Introduction

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

cni-from-scratch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cni-from-scratch's Issues

why use /var/run/netns?

Thanks for the great presentation! I watched on youtube and there was a step that I couldn't yet understand.

why would you prefer /var/run/nets than /proc/$PID/ns/net?
as code write here:

ln -sfT $CNI_NETNS /var/run/netns/$CNI_CONTAINERID

could you tell a little bit more about this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.