ovn-kubernetes

Kubernetes integration for OVN

Github星跟蹤圖

How to use Open Virtual Networking with Kubernetes

On Linux, the easiest way to get started is to use OVN daemonset and deployments.

Install Open vSwitch kernel modules on all hosts.

Most Linux distributions come with openvswitch kernel module by default. You
can check its existence with modinfo openvswitch. The features that OVN
needs are only available in kernel 4.6 and greater. But, you can also install
openvswitch kernel module from the openvswitch repository to get all the
features OVN needs (and any possible bug fixes) for any kernel.

To install openvswitch kernel module from openvswitch repo manually, please
read INSTALL.rst. For a quick start on Ubuntu, you can install
the kernel module package by:

sudo apt-get install apt-transport-https
echo "deb http://3.19.28.122/openvswitch/stable /", sudo tee /etc/apt/sources.list.d/openvswitch.list
wget -O - http://3.19.28.122/openvswitch/keyFile, sudo apt-key add -
sudo apt-get update
sudo apt-get build-dep dkms
sudo apt-get install openvswitch-datapath-dkms -y

Run daemonset and deployments

On Kubernetes master, label it to run daemonsets.

kubectl taint nodes --all node-role.kubernetes.io/master-

Create OVN daemonset and deployment yamls from templates by running the commands below:
(The $MASTER_IP below is the IP address of the machine where kube-apiserver is
running). Note, when specifying the pod CIDR to the command below, daemonset.sh will
generate a /24 subnet prefix to create per-node CIDRs. Ensure your pod subnet is has a
prefix less than 24, or edit hte generated ovn-setup.yaml and specify a host subnet
prefix. For example, providing a net-cidr of "129.168.1.0/24" would require modifying
ovn-setup.yaml with a host subnet prefix as follows:

data:
  net_cidr:      "192.168.1.0/24/25"

Where "/25" is just chosen for this example, but may be any legitimate prefix value greater
than 24.

# Clone ovn-kubernetes repo
mkdir -p $HOME/work/src/github.com/ovn-org
cd $HOME/work/src/github.com/ovn-org
git clone https://github.com/ovn-org/ovn-kubernetes
cd $HOME/work/src/github.com/ovn-org/ovn-kubernetes/dist/images
./daemonset.sh --image=docker.io/ovnkube/ovn-daemonset-u:latest \
    --net-cidr=192.168.0.0/16 --svc-cidr=172.16.1.0/24 \
    --gateway-mode="local" \
    --k8s-apiserver=https://$MASTER_IP:6443

Apply OVN daemonset and deployment yamls.

# Create OVN namespace, service accounts, ovnkube-db headless service, configmap, and policies
kubectl create -f $HOME/work/src/github.com/ovn-org/ovn-kubernetes/dist/yaml/ovn-setup.yaml

# Run ovnkube-db deployment.
kubectl create -f $HOME/work/src/github.com/ovn-org/ovn-kubernetes/dist/yaml/ovnkube-db.yaml

# Run ovnkube-master deployment.
kubectl create -f $HOME/work/src/github.com/ovn-org/ovn-kubernetes/dist/yaml/ovnkube-master.yaml

# Run ovnkube daemonset for nodes
kubectl create -f $HOME/work/src/github.com/ovn-org/ovn-kubernetes/dist/yaml/ovnkube-node.yaml

NOTE: You don't need kube-proxy for OVN to work. You can delete that from your
cluster.

Manual installation and Vagrant

For Windows, (and to understand what daemonsets run internally), please read
MANUAL.md. For more advanced use cases too (like SSL, HA of databases, and various
gateway modes supported), please read MANUAL.md.

主要指標

概覽
名稱與所有者ovn-kubernetes/ovn-kubernetes
主編程語言Go
編程語言Shell (語言數: 5)
平台
許可證Apache License 2.0
所有者活动
創建於2016-08-11 17:51:02
推送於2025-05-22 22:59:45
最后一次提交2025-05-22 18:59:45
發布數10
最新版本名稱v1.1.0-beta (發布於 )
第一版名稱v0.1-alpha (發布於 )
用户参与
星數0.9k
關注者數56
派生數374
提交數8.3k
已啟用問題?
問題數869
打開的問題數107
拉請求數3358
打開的拉請求數127
關閉的拉請求數909
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?