KatharaFramework / Megalos-CNI

CNI Plugin used in Megalos to create pure L2 networks using VXLAN and EVPN BGP.
GNU General Public License v3.0
14 stars 0 forks source link

Sample Network Attachment Definition #4

Closed infinitydon closed 1 year ago

infinitydon commented 1 year ago

Hi,

I am trying to get sample multus NAD that uses megalos. Can someone kindly provide this or link to the documentation, I was not able to locate it in the repo.

Thanks

Skazza94 commented 1 year ago

Hi @infinitydon, thanks for reaching out.

The Megalos CNI was mainly developed to be used inside Kathará to deploy pure Layer2 networks over Kubernetes (since traditional plugins always require an IP CIDR). The CNI is automatically configured by Kathará when a new network is requested, that's the reason why there are no examples in the repository. However, I think it is also possible to use it standalone.

Here's a NAD YAML to configure a network manually:

apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: test-network-1
spec:
  config: '{
              "cniVersion": "0.3.0",
              "name": "net1",
              "type": "megalos",
              "suffix": "ntwork",
              "vxlanId": 10
            }'

I'll explain the config values briefly:

This will create a VTEP (with VXLAN ID = 10) associated to the network net1-ntwork.

Finally, keep in mind that currently the Megalos CNI doesn't work on EKS, AKS and ready-to-go cloud instances of K8s, it only works on self-hosted clusters (since iptables needs to install some custom rules).

I will add the example in the README, if you have any other question don't hesitate to reply, otherwise we kindly ask you to close the PR.

Thanks! Mariano.

infinitydon commented 1 year ago

Ok. Thanks for the clarification