github.com/imran-kn/cilium-fork@v1.6.9/Documentation/gettingstarted/ipam-crd.rst (about) 1 .. only:: not (epub or latex or html) 2 3 WARNING: You are looking at unreleased Cilium documentation. 4 Please use the official rendered version released here: 5 http://docs.cilium.io 6 7 .. _gsg_ipam_crd: 8 9 *************** 10 CRD-backed IPAM 11 *************** 12 13 This is a quick tutorial walking through how to enable CRD-backed IPAM. The 14 purpose of this tutorial is to show how components are configured and resources 15 interact with each other to enable users to automate or extend on their own. 16 17 For more details, see the section :ref:`concepts_ipam_crd` 18 19 Enable CRD IPAM mode 20 ==================== 21 22 #. Setup Cilium for Kubernetes using any of the available guides. 23 #. Run Cilium with the ``--ipam=crd`` option or set ``ipam: crd`` in the 24 ``cilium-config`` ConfigMap. 25 #. Restart Cilium. Cilium will automatically register the CRD if not available already 26 27 :: 28 29 msg="Waiting for initial IP to become available in 'k8s1' custom resource" subsys=ipam 30 31 #. Validate that the CRD has been registered: 32 33 :: 34 35 kubectl get crds 36 NAME CREATED AT 37 [...] 38 ciliumnodes.cilium.io 2019-06-08T12:26:41Z 39 40 Create a CiliumNode CR 41 ====================== 42 43 #. Import the following custom resource to make t 44 45 .. code-block:: yaml 46 47 apiVersion: "cilium.io/v2" 48 kind: CiliumNode 49 metadata: 50 name: "k8s1" 51 spec: 52 ipam: 53 available: 54 192.168.1.1: {} 55 192.168.1.2: {} 56 192.168.1.3: {} 57 192.168.1.4: {} 58 59 #. Validate that Cilium has started up correctly 60 61 :: 62 63 cilium status --all-addresses 64 KVStore: Ok etcd: 1/1 connected, has-quorum=true: https://192.168.33.11:2379 - 3.3.12 (Leader) 65 [...] 66 IPAM: IPv4: 2/4 allocated, 67 Allocated addresses: 68 192.168.1.1 (router) 69 192.168.1.3 (health) 70 71 #. Validate the ``status.IPAM.used`` section: 72 73 :: 74 75 kubectl get cn k8s1 -o yaml 76 apiVersion: cilium.io/v2 77 kind: CiliumNode 78 metadata: 79 name: k8s1 80 [...] 81 spec: 82 ipam: 83 available: 84 192.168.1.1: {} 85 192.168.1.2: {} 86 192.168.1.3: {} 87 192.168.1.4: {} 88 status: 89 ipam: 90 used: 91 192.168.1.1: 92 owner: router 93 192.168.1.3: 94 owner: health