Multus installation on post_deploy works for kind but not for k3s
During troubleshooting with @tjaarda we identified an issue with the current automation for installing Multus CNI.
In post_deploy script we use the following to deploy multus:
kubectl apply -f https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/master/deployments/multus-daemonset-thick.yml
This works fine for Kind but not for k3s.
To deploy Multus on k3s cluster we have to apply the following helm resource:
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: multus
namespace: kube-system
spec:
repo: https://rke2-charts.rancher.io
chart: rke2-multus
targetNamespace: kube-system
valuesContent: |-
config:
fullnameOverride: multus
cni_conf:
confDir: /var/lib/rancher/k3s/agent/etc/cni/net.d
binDir: /var/lib/rancher/k3s/data/cni/
kubeconfig: /var/lib/rancher/k3s/agent/etc/cni/net.d/multus.d/multus.kubeconfig
# Comment the following line when using rke2-multus < v4.2.202
multusAutoconfigDir: /var/lib/rancher/k3s/agent/etc/cni/net.d
rke2-whereabouts:
fullnameOverride: whereabouts
enabled: true
cniConf:
confDir: /var/lib/rancher/k3s/agent/etc/cni/net.d
binDir: /var/lib/rancher/k3s/data/cni/
After we deploy the Multus using the above, the netma test passed.