k8snetworkplumbingwg/ovs-cni
소개
Open vSwitch CNI plugin
시스템 및 인프라측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalOpen 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
Per-pod parameters such as the interface mac or an OVN ovnPort can be passed
through the network's cni-args; see
Per-Pod Arguments for details.
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.
관련 프로젝트 살펴보기
불러오는 중…