Closed infinitydon closed 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:
name
: a name for the network (max 4 chars)suffix
: this one is used by Kathará to distinguish between networks with the same name
of different users (it's 6 chars)vxlanId
: Megalos CNI relies on VXLAN, so you should assign a VXLAN ID (Kathara does it automatically), I assigned 10This 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.
Ok. Thanks for the clarification
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