When set vyos into the k8s platform, but the MACVLAN can not be recoineged by the system that will cause configuration failed.
```
root@localhost:~# kubectl get nodes -owide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
localhost Ready control-plane,etcd,master 41h v1.27.3+k3s1 192.168.2.34 <none> Debian GNU/Linux 12 (bookworm) 6.1.0-17-amd64 containerd://1.7.1-k3s1
root@localhost:~#
1. VyOS yaml:
root@localhost:~# cat 5.sh
#!/bin/bash
set -v
date
controller_node=`kubectl get nodes --no-headers -o custom-columns=NAME:.metadata.name| grep control-plane`
worker_node=`kubectl get nodes --no-headers -o custom-columns=NAME:.metadata.name| grep worker2`
cat <<EOF | kubectl apply -f -
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: macvlan-whereabouts-public
spec:
config: '{
"cniVersion": "0.3.0",
"name": "whereaboutsexample",
"type": "macvlan",
"master": "enp2s0",
"mode": "bridge"
}'
EOF
cat <<EOF | kubectl apply -f -
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: macvlan-whereabouts-private
spec:
config: '{
"cniVersion": "0.3.0",
"name": "whereaboutsexample",
"type": "macvlan",
"master": "enp3s0",
"mode": "bridge"
}'
EOF
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
name: vyos
annotations:
k8s.v1.cni.cncf.io/networks: macvlan-whereabouts-public@eth1, macvlan-whereabouts-private@eth2
spec:
containers:
- name: vyos
image: 192.168.2.100:5000/vyos/vyos:1.4.9
command: ["/sbin/init"]
volumeMounts:
- name: lib-muodules
mountPath: /lib/modules
securityContext:
privileged: true
volumes:
- name: lib-muodules
hostPath:
path: /lib/modules
nodeName: ${worker_node}
EOF
root@localhost:~#
```
it should be here.https://github.com/vyos/vyos-1x/blob/f33657534fb6e5253a88a04aa57fee6341b92a87/python/vyos/ethtool.py#L24. there is no such driver for MACVLAN
```
vyos@vyos# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 fe80::200:ff:fe00:0/64 scope link
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host proto kernel_lo
valid_lft forever preferred_lft forever
2: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/ipip 0.0.0.0 brd 0.0.0.0
4: eth0@if71: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1480 qdisc noqueue state UP group default
link/ether e2:24:b8:1e:d3:15 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 172.16.20.5/32 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::e024:b8ff:fe1e:d315/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
5: eth1@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 92:c2:7c:79:ad:50 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::90c2:7cff:fe79:ad50/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
6: eth2@if4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether ae:cd:93:f4:30:0a brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::accd:93ff:fef4:300a/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
7: pim6reg@NONE: <NOARP,UP,LOWER_UP> mtu 1452 qdisc noqueue state UNKNOWN group default qlen 1000
link/pimreg
[edit]
vyos@vyos#
root@vyos:~# ethtool -i eth1
driver: macvlan
version: 0.1
firmware-version:
expansion-rom-version:
bus-info:
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
root@vyos:~# su vyos
cvyos@vyos:/root$ configure
s[edit]
vyos@vyos# set interfaces ethernet
Possible completions:
> ethN Ethernet interface name
> // there is no eth1 and eth2
[edit]
vyos@vyos# set interfaces ethernet
```