IPoIB
IPoIB CNI
Reference
IPoIB의 child link를 생성해서 Pod에 연결하는 CNI 입니다.
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: ipoib-cni
  namespace: kube-system
  labels:
    app.kubernetes.io/name: ipoib-cni
    app: ipoib-cni
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: ipoib-cni
      app: ipoib-cni
  template:
    metadata:
      labels:
        app.kubernetes.io/name: ipoib-cni
        app: ipoib-cni
    spec:
      hostNetwork: true
      tolerations:
        - operator: Exists
      containers:
        - name: main
          image: ghcr.io/mellanox/ipoib-cni:v1.2.2
          imagePullPolicy: IfNotPresent
          resources:
            requests:
              cpu: "100m"
              memory: "50Mi"
            limits:
              cpu: "100m"
              memory: "50Mi"
          securityContext:
            privileged: true
          volumeMounts:
            - name: cnibin
              mountPath: /host/opt/cni/bin
      volumes:
        - name: cnibin
          hostPath:
            path: /opt/cni/bin
CNI 설정
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: ipoib
  namespace: kube-system
spec:
  config: |
    {
      "name": "ipoib",
      "type": "ipoib",
      "master": "ib0",
      "ipam": {
        "type": "whereabouts",
        "range": "172.16.0.0/16"
      }
    }
- name: <name>: NetworkAttachmentDefinition의 name과 일치해야 합니다.
- type: ipoib
- master: <interface>
- ipam- type: <type>: IP 관리에 사용할 바이너리입니다.- https://www.cni.dev/plugins/current/ipam/
- dhcp는 지원되지 않습니다.
- whereabouts