Giter Club home page Giter Club logo

ovn-kubernetes's Introduction

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)

# 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's People

Contributors

shettyg avatar dcbw avatar girishmg avatar pecameron avatar aserdean avatar ionutbalutoiu avatar alinbalutoiu avatar salv-orlando avatar jacobtanenbaum avatar russellb avatar danwinship avatar mestery avatar moshe010 avatar tong101 avatar yaozengzeng avatar feiskyer avatar winsopc avatar mozhuli avatar rostyslavfridman avatar trevortaoarm avatar bsteciuk avatar ganboing avatar squeed avatar pires avatar shahar-klein avatar zhouhuijing avatar apconole avatar adelina-t avatar akashgangil avatar bmeng avatar

Watchers

James Cloos avatar Mark Michelson 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.