This commit is contained in:
2026-04-07 14:02:32 +00:00
parent 09f734d0ad
commit c941697570

View File

@@ -0,0 +1,46 @@
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