/
Installing CNI-Infoblox IPAM Driver for Kubernetes

Installing CNI-Infoblox IPAM Driver for Kubernetes

It is recommended that you run the Infoblox IPAM Daemon as a daemonset in kubernetes cluster.

  1. Create the daemonset before starting the plugin.
    kubectl create -f k8s/cni-infoblox-daemon.yaml
    A docker image is available in infoblox/cni-infoblox-daemon:1.0 Docker Hub. This image contains a binary form of cni-infoblox-daemon.
    You must update the base64 wapi-password in k8s/cni-infoblox-daemon.yaml
  2. Deploy the cni-infoblox-plugin daemonset in either of the following way:
    1. Infoblox plugin + CNI network configuration file:
      kubectl create -f k8s/cni-infoblox-plugin.yaml

    2. Infoblox plugin only:
      kubectl create -f k8s/cni-infoblox-plugin-without-net-conf.yaml

You can use the preceding commands to create a cni-infoblox-plugin daemonset in kubernetes cluster. It requires a docker image that is available at infoblox/cni-infoblox-plugin. If you use k8s/cni-infoblox-plugin.yaml, it will install the infoblox plugin binary and network configuration file in the locations /opt/cni/bin and /etc/cni/net.d respectively on all worker nodes. If you use k8s/cni-infoblox-plugin-without-net-conf.yaml, it will copy the infoblox plugin binary only..

If you want to make any changes in the network configuration, do either of the following:

  • Change the network config file contents in the cni-infoblox plugin as shown below:
    kubectl apply -f k8s/cni-infoblox-plugin.yaml

  • Change the configmap once the daemonset is created:
    kubectl edit configmap infoblox-cni-cfg --namespace=kube-system


Note

It takes about one minute to reflect the configmap changes using the configmap edit command. You should name the network configuration file with proper order. If there are multiple CNI configuration files in the kubernetes network config directory (i.e. /etc/cni/net.d), then the first one in lexicographic order of file name is used.


Example:

In the following example, the  filename is given as infoblox-ipam.conf, which should match the value of the key ipam_conf_file_name.

ipam_conf_file_name: infoblox-ipam.conf

 ## Network Config file contents##

 ## This key should match the value of the key 'ipam_conf_file_name'##

 infoblox-ipam.conf: |

{

"name": "infoblox-ipam-network",

"type": "macvlan",

"master":"eth0",

"ipam": {

    "type": "infoblox",

    "subnet": "10.0.0.0/24",

    "gateway":"10.0.0.1",

    "network-view": "cni_view"

    }

}

Related content