我正在尝试在 Prem 环境的 GKE 上安装静态/行踪(使用 multus)IPAM CNI 插件,以创建一个额外的接口并与同一集群中的节点之间的 Pod 进行通信。
Multus 插件运行良好,但即使在 daemonSet 文件中指向该位置后,我也没有在主机目录 (/opt/cni/bin) 上看到静态/行踪 IPAM cni 插件的 bin 文件。
我想知道是否支持静态/行踪 IPAM cni 插件,但 GKE on Prem。
以下是我在 whereabouts daemonSet 文件中所做的更改。
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: whereabouts
namespace: kube-system
labels:
tier: node
app: whereabouts
spec:
selector:
matchLabels:
name: whereabouts
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
tier: node
app: whereabouts
name: whereabouts
spec:
hostNetwork: true
serviceAccountName: whereabouts
nodeSelector:
beta.kubernetes.io/arch: amd64
tolerations:
- operator: Exists
effect: NoSchedule
containers:
- name: whereabouts
image: ghcr.io/k8snetworkplumbingwg/whereabouts:latest-amd64
env:
**- name: CNI_BIN_DIR**
<<<<<<<<<<<<<<<<< Added this
**value: "/host/home/ubuntu/opt/cni/bin"** <<<<<<<<<<<<<<<<< Added this and point to the correct bin directory
- name: WHEREABOUTS_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
resources:
requests:
cpu: "100m"
memory: "50Mi"
limits:
cpu: "100m"
memory: "50Mi"
securityContext:
privileged: true
volumeMounts:
- name: cnibin
**mountPath: /host/home/ubuntu/opt/cni/bin** <<<<<<<<<<<<<<<<< bin directory
- name: cni-net-dir
**mountPath: /host/etc/cni/net.d** <<<<<<<<<<<<<<<<< bin directory
volumes:
- name: cnibin
hostPath:
**path: /host/home/ubuntu/opt/cni/bin** <<<<<<<<<<<<<<<<< bin directory
- name: cni-net-dir
hostPath:
path: /etc/cni/net.d