微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 GKE on Prem 中安装后,静态/行踪 IPAM cni 插件 bin 文件丢失

如何解决在 GKE on Prem 中安装后,静态/行踪 IPAM cni 插件 bin 文件丢失

我正在尝试在 GKE on Prem 环境中安装静态/行踪(使用 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

解决方法

我能够安装 whereabouts IPAM cni 插件。不需要指向daemonSet文件中的cni bin目录(/opt/cni/bin)。

但是,我还不能安装静态 IPAM cni 插件。不知道如何从 git repo 安装。

如有任何帮助,我们将不胜感激。

谢谢。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。