ungleich-k8s/cni/multus/README.md
Nico Schottelius 79c78161bd Finish multus tests
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
2022-10-05 13:07:42 +02:00

2.5 KiB

Steps

Getting multus up running:

kubectl apply -f multus-daemonset-crio.yml

Host devices (server123)

Before adding:

3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 3c:ec:ef:cb:d8:1b brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 3c:ec:ef:cb:d8:1c brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 3c:ec:ef:cb:d8:1d brd ff:ff:ff:ff:ff:ff
6: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 3c:ec:ef:cb:d8:1e brd ff:ff:ff:ff:ff:ff
7: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 3c:ec:ef:cb:d8:1f brd ff:ff:ff:ff:ff:ff
8: eth6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 3c:ec:ef:cb:df:0a brd ff:ff:ff:ff:ff:ff
9: eth7: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000

Inside the pod

Starting with

kubectl apply -f pod-eth1.yaml

Checking:

[21:20] bridge:multus% kubectl exec -ti samplepod -- ash
/ # ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3: eth0@if18: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
    link/ether d2:85:1f:11:d4:d8 brd ff:ff:ff:ff:ff:ff
4: net1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 3c:ec:ef:cb:d8:1b brd ff:ff:ff:ff:ff:ff
/ #

On the host it has been removed:

[21:21] server123.place10:/etc/cni/net.d# ip l | grep eth1
[21:22] server123.place10:/etc/cni/net.d#

IPAM works correctly as well:

4: net1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 3c:ec:ef:cb:d8:1b brd ff:ff:ff:ff:ff:ff
    inet 10.1.2.2/24 brd 10.1.2.255 scope global net1
       valid_lft forever preferred_lft forever
    inet6 2a0a:e5c0:10:20::2/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::3eec:efff:fecb:d81b/64 scope link
       valid_lft forever preferred_lft forever
/ #

After the pod is destroyed, eth1 is back:

[21:22] server123.place10:/etc/cni/net.d# ip l | grep eth1
19: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    alias eth1

SEE ALSO