Skip to content

Create VXLAN overlay Network

Huanyu He edited this page Apr 13, 2022 · 4 revisions

Using the helm chart in Getting Started, an overlay Network will always be created. The "init" Network/Subnet object can be configured with helm commands such as:

helm install hybridnet hybridnet/hybridnet -n kube-system --set init.cidr=100.65.0.0/16 --set init.vxlanID=100

The "init" Network/Subnet CR objects will only be applied once by helm install.

Hybridnet use VXLAN as the only encapsulation protocol to build overlay network. Differ from Flannel, hybridnet will not allocate subnets for every node, which give a great flexibility.

Just like what we see in the overlay sample yaml, at least one Subnet object and overlay Network object is needed. Only one overlay Network is allowed for every hybridnet cluster.

apiVersion: networking.alibaba.com/v1
kind: Network
metadata:
  name: network1
spec:
  netID: 4                      # Required. 
                                # For Overlay type, netID refers to the tunnel id which used by vxlan
                                
  type: Overlay                 # Required. Underlay or Overlay
  
                                # For an overlay Network, .spec.nodeSelector need not to be set, which
                                # means every Node of the Kubernetes cluster will be added to it automatically.

An overlay Network usually work along with multiple Subnet objects, all the fields of Network and Subnet CR objects is introduced in API description.