apiVersion: apps/v1 kind: DaemonSet metadata: name: install-cni-plugins namespace: kube-system spec: selector: matchLabels: app: install-cni-plugins template: metadata: labels: app: install-cni-plugins spec: hostNetwork: true hostPID: true tolerations: - operator: Exists containers: - name: installer image: alpine:3.20 securityContext: privileged: true command: - /bin/sh - -ec - | apk add --no-cache curl tar ARCH=amd64 VER=v1.6.0 mkdir -p /host/opt/cni/bin cd /tmp curl -L -o cni-plugins.tgz \ https://github.com/containernetworking/plugins/releases/download/${VER}/cni-plugins-linux-${ARCH}-${VER}.tgz tar -xzf cni-plugins.tgz -C /host/opt/cni/bin chmod 755 /host/opt/cni/bin/* ls -l /host/opt/cni/bin sleep infinity volumeMounts: - name: host-opt-cni-bin mountPath: /host/opt/cni/bin volumes: - name: host-opt-cni-bin hostPath: path: /opt/cni/bin type: DirectoryOrCreate