CRD-backed IPAM

This is a quick tutorial walking through how to enable CRD-backed IPAM. The purpose of this tutorial is to show how components are configured and resources interact with each other to enable users to automate or extend on their own.

For more details, see the section CRD-Backed

Enable CRD IPAM mode

  1. Setup Cilium for Kubernetes using any of the available guides.

  2. Run Cilium with the --ipam=crd option or set ipam: crd in the cilium-config ConfigMap.

  3. Restart Cilium. Cilium will automatically register the CRD if not available already

    msg="Waiting for initial IP to become available in 'k8s1' custom resource" subsys=ipam
  4. Validate that the CRD has been registered:

    kubectl get crds
    NAME                              CREATED AT
    [...]             2019-06-08T12:26:41Z

Create a CiliumNode CR

  1. Import the following custom resource to make t

    apiVersion: ""
    kind: CiliumNode
      name: "k8s1"
      ipam: {} {} {} {}
  2. Validate that Cilium has started up correctly

    cilium status --all-addresses
    KVStore:                Ok   etcd: 1/1 connected, has-quorum=true: - 3.3.12 (Leader)
    IPAM:                   IPv4: 2/4 allocated,
    Allocated addresses: (router) (health)
  3. Validate the status.IPAM.used section:

    kubectl get cn k8s1 -o yaml
    kind: CiliumNode
      name: k8s1
      ipam: {} {} {} {}

            owner: router

            owner: health