• Stars
    star
    219
  • Rank 181,133 (Top 4 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated about 2 months ago

Reviews

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

Repository Details

Open vSwitch CNI plugin

Open vSwitch CNI plugin

This plugin allows user to define Kubernetes networks on top of Open vSwitch bridges available on nodes. Note that ovs-cni does not configure bridges, it's up to a user to create them and connect them to L2, L3 or an overlay network. This project also delivers OVS marker, which exposes available bridges as Node resources, that can be used to schedule pods on the right node via intel/network-resources-injector. Finally please note that Open vSwitch must be installed and running on the host.

In order to use this plugin, Multus must be installed on all hosts and NetworkAttachmentDefinition CRD created.

Overview

First create network attachment definition. This object specifies to which Open vSwitch bridge should the pod be attached and what VLAN ID should be set on the port. For more information, check plugin documentation.

cat <<EOF | kubectl create -f -
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: ovs-conf
  annotations:
    k8s.v1.cni.cncf.io/resourceName: ovs-cni.network.kubevirt.io/br1
spec:
  config: '{
      "cniVersion": "0.4.0",
      "type": "ovs",
      "bridge": "br1",
      "vlan": 100
    }'
EOF

Once the network definition is created and desired Open vSwitch bridges are available on nodes, a pod requesting the network can be created.

cat <<EOF | kubectl create -f -
apiVersion: v1
kind: Pod
metadata:
  name: samplepod
  annotations:
    k8s.v1.cni.cncf.io/networks: ovs-conf
spec:
  containers:
  - name: samplepod
    command: ["/bin/sh", "-c", "sleep 99999"]
    image: alpine
    resources:  # this may be omitted if intel/network-resources-injector is present on the cluster
      limits:
        ovs-cni.network.kubevirt.io/br1: 1
EOF

Such pod should contain default eth0 interface connected to default Kubernetes network and also net1 connected to the bridge.

$ kubectl exec samplepod ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3: eth0@if11: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1450 qdisc noqueue state UP
    link/ether 0a:58:0a:f4:00:07 brd ff:ff:ff:ff:ff:ff
5: net1@if12: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
    link/ether e6:f4:2e:b4:4b:6e brd ff:ff:ff:ff:ff:ff

Deployment and Usage

You can choose to deploy this plugin on local virtualized cluster or on your arbitrary cluster. After that you can follow demo that will guide you through preparation of Open vSwitch bridges, defining networks on Kubernetes and attaching pods to them.

Components

  • CNI Plugin - Documentation of standalone Open vSwitch CNI plugin.
  • Port Mirroring - Documentation of an OVS CNI extension, allowing for port mirroring.
  • Hardware Offload - Documentation of hardware offload functionality, using SR-IOV.
  • Marker - Documentation of daemon set exposing bridges as node resources.

Development

Development guide is a go-to reference point for development helper commands, building, testing, container images and local cluster.

More Repositories

1

multus-cni

A CNI meta-plugin for multi-homed pods in Kubernetes
Go
2,332
star
2

sriov-network-device-plugin

SRIOV network device plugin for Kubernetes
Go
400
star
3

sriov-cni

DPDK & SR-IOV CNI plugin
Go
308
star
4

whereabouts

A CNI IPAM plugin that assigns IP addresses cluster-wide
Go
279
star
5

sriov-network-operator

Operator for provisioning and configuring SR-IOV CNI plugin and device plugin
Go
82
star
6

bond-cni

Bond-cni is for fail-over and high availability of networking in cloudnative orchestration
Go
63
star
7

reference-deployment

Resources for K8s NPWG's deployment
Shell
44
star
8

multi-net-spec

Multi-network CRD specification
43
star
9

ib-sriov-cni

InfiniBand SR-IOV CNI
Go
42
star
10

network-resources-injector

A Kubernetes Dynamic Admission Controller that patches Pods to add additional information.
Go
42
star
11

rdma-cni

RDMA CNI plugin for containerized workloads
Go
41
star
12

kubemacpool

Go
35
star
13

sriovnet

Go library/package to configure SRIOV networking devices
Go
31
star
14

multus-dynamic-networks-controller

A Kubernetes controller listening to pod's network selection elements. When the multus annotations changes, it will invoke the corresponding delegate
Go
27
star
15

sriov-network-metrics-exporter

Exporter that reads metrics for SR-IOV Virtual Functions and exposes them in the Prometheus format.
Go
24
star
16

multus-service

(TBD)
Go
23
star
17

community

The Network Plumbing Working Group Community information
21
star
18

helm-charts

Helm charts for deployment of NPWG implementations and ancillary tools
Smarty
20
star
19

k8s-net-attach-def-controller

K8s Multi- network service controller
Go
16
star
20

multi-networkpolicy

Go
15
star
21

accelerated-bridge-cni

Go
12
star
22

network-attachment-definition-client

A Golang Kubernetes client
Go
11
star
23

kubectl-multinet

This is a kubectl plugin which outputs Pods' network-status of multi-net-spec,
Go
11
star
24

multi-networkpolicy-iptables

MultiNetworkPolicy iptable based implementation
Go
11
star
25

multi-networkpolicy-tc

Linux Traffic Control (TC) based implementation of Kubernetes NPWG MultiNetworkPolicy API
Go
10
star
26

multusctl

CLI client for Multus CNI
Go
7
star
27

ptp-operator

PTP Operator manages cluster wide PTP configuration
Go
7
star
28

net-attach-def-admission-controller

An admission controller to check resources as defined by the NPWG spec
Go
5
star
29

bridge-operator

Bridge-operator manages linux bridge in Kubernetes cluster node.
Go
4
star
30

cni-log

Cni-log provides general logging functionality for Container Network Interfaces (CNI).
Go
3
star
31

net-service-controller

Network service controller (Multus compatible)
Go
3
star
32

device-info-spec

3
star