You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+60-58Lines changed: 60 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,20 +92,23 @@ This installs k8slan in the namespace `k8slan-system`. change the namespace in t
92
92
apiVersion: lan.k8slan.io/v1beta1
93
93
kind: LAN
94
94
metadata:
95
-
name: lan-test
95
+
name: lan-example
96
96
spec:
97
97
ns: knlvrf
98
98
bridge: br2
99
99
vxlan: vx2
100
100
vni: 222
101
-
defaultVxlanDev: eth0.10
101
+
defaultVxlanDev: eth0
102
102
vxlanDevMap:
103
103
worker1: eth1
104
104
worker2: eth2
105
105
spokes:
106
-
- pod1
107
-
- pod2
106
+
- srl
107
+
- vm
108
108
```
109
+
-`ns` specifies the net namespace dedicate for the virtual LAN, it mounts under `/run/k8slan/netns/` of each k8s worker
110
+
-`bridge` specifies the local bridge interface name, lives in the LAN namespace
111
+
-`vni` specifies the VNI used for the VXLAN tunnel
109
112
-`vxlanDevMap` list which interface to use as vxlan interface underlying device on the specified host, key is the hostname, value is the interface name; if a host is not listed here, then `defaultVxlanDev` is used
110
113
-`spokes` is a list of veth interface names, one for each connecting pod; in case of kubevirt VM, a macvtap interface is created on top of the veth interface.
111
114
- following values must be unique across all LAN CRs
@@ -116,94 +119,93 @@ spec:
116
119
**Note: having duplicate value for above field could cause networking issue and/or connecting pod failed to create**
117
120
118
121
2. k8slan will create two NetworkAttachmentDefinition for each spoke in the CR:
119
-
-one is `k8slan-mac-<spoke>`
120
-
-one is `k8slan-veth-<spoke>`
122
+
-`k8slan-mac-<spoke>`: use by kubevirt VM to attach
123
+
-`k8slan-veth-<spoke>`: use for pod to attach
121
124
122
-
3. create the pod attach to the LAN:
123
-
- reference the NetworkAttachmentDefinition with prefix `k8slan-veth-`
124
-
- reference spoke name in resource section: `macvtap.k8slan.io/k8slan-veth-pod2: 1`
125
+
note: For a given spoke, only one of these two should be used, not both.
126
+
127
+
128
+
3. create the pod/vm attach to the LAN:
129
+
130
+
3a. for pod
131
+
- reference the NetworkAttachmentDefinition with prefix `k8slan-veth-<spoke>`
132
+
- reference spoke name in resource section: `macvtap.k8slan.io/k8slan-veth-<spoke>: 1`
0 commit comments