Git Product home page Git Product logo

kindnet's Introduction

Simple CNI plugin with IPv4, IPv6 and DualStack support

The main goal of the project is to have a simple CNI plugin for Kubernetes with IPv4 and IPv6 support that provides the Cluster Networking

The idea was born because of the lack of IPv6 support in current CNI plugins and because there are no automatic alternatives to create a multinode kubernetes cluster with IPv6.

The plugin only works on "simple" network environments, when all the cluster nodes belong to the same subnet.

Kindnet evolved adding new features, as an embedded ipmasq agent and nowadays, is the default CNI plugin for KIND

All the stable code was moved to the KIND project in-tree. This repo is kept only for new features development and for experimenting using it on "real" clusters.

Kindnet components

It uses the following standard CNI plugins

  • ptp: creates a veth pair and adds the host and the container to it.
  • bridge: creates a bridge, adds the host and the container to it.
  • host-local: maintains a local database of allocated IPs. It uses the ipRanges capability to provide dynamic configuration for the Pods subnets.
  • portmap: An iptables-based portmapping plugin. Maps ports from the host's address space to the container.

And a daemon named kindnetd with the following features:

  • CNI config: configures the CNI plugin dropping the file /etc/cni/net.d/10-kindnet.conflist
  • routing: install routes on the to the POD subnets in the other nodes
  • ip-masq: non masquerade traffic that is directed to PODs

Installation

Kindnet can be installed on your cluster using the manifest install-kindnet.yaml

kubectl create -f https://raw.githubusercontent.com/aojea/kindnet/master/install-kindnet.yaml

By default, the ptp CNI plugin is used, but the bridge plugin can be selected by setting the environment variable CNI_BRIDGE in the kindnet-cni container. You can use the following manifest directly:

kubectl create -f https://raw.githubusercontent.com/aojea/kindnet/master/install-kindnet-bridge.yaml

Kindnet installation manifest has an init container that drop the CNI binaries in the folder /opt/cni/bin/, however, you can install them directly supressing the init container in the manifest and following the next steps:

export ARCH="amd64"
export CNI_VERSION="v1.1.1"
export CNI_TARBALL="${CNI_VERSION}/cni-plugins-linux-${ARCH}-${CNI_VERSION}.tgz"
export CNI_URL="https://github.com/containernetworking/plugins/releases/download/${CNI_TARBALL}"
curl -sSL --retry 5 --output /tmp/cni.tgz "${CNI_URL}"
mkdir -p /opt/cni/bin
tar -C /opt/cni/bin -xzf /tmp/cni.tgz
rm -rf /tmp/cni.tgz

kindnet's People

Contributors

aojea avatar

Watchers

 avatar

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.