github.com/imran-kn/cilium-fork@v1.6.9/Documentation/gettingstarted/k8s-install-azure-cni-steps.rst (about)

     1  Create an AKS + Cilium CNI configuration
     2  ========================================
     3  
     4  Create a ``chaining.yaml`` file based on the following template to specify the
     5  desired CNI chaining configuration:
     6  
     7  
     8  .. code:: yaml
     9  
    10      apiVersion: v1
    11      kind: ConfigMap
    12      metadata:
    13        name: cni-configuration
    14        namespace: cilium
    15      data:
    16        cni-config: |-
    17          {
    18            "cniVersion": "0.3.0",
    19            "name": "azure",
    20            "plugins": [
    21              {
    22                "type": "azure-vnet",
    23                "mode": "transparent",
    24                "bridge": "azure0",
    25                "ipam": {
    26                   "type": "azure-vnet-ipam"
    27                 }
    28              },
    29              {
    30                "type": "portmap",
    31                "capabilities": {"portMappings": true},
    32                "snat": true
    33              },
    34              {
    35                 "name": "cilium",
    36                 "type": "cilium-cni"
    37              }
    38            ]
    39          }
    40  
    41  Create the cilium namespace:
    42  
    43  .. code:: bash
    44  
    45     kubectl create namespace cilium
    46  
    47  
    48  Deploy the `ConfigMap`:
    49  
    50  .. code:: bash
    51  
    52     kubectl apply -f chaining.yaml
    53  
    54  
    55  Prepare & Deploy Cilium
    56  =======================
    57  
    58  .. include:: k8s-install-download-release.rst
    59  
    60  Generate the required YAML file and deploy it:
    61  
    62  .. code:: bash
    63  
    64     helm template cilium \
    65       --namespace cilium \
    66       --set global.cni.chainingMode=generic-veth \
    67       --set global.cni.customConf=true \
    68       --set global.nodeinit.enabled=true \
    69       --set nodeinit.azure=true \
    70       --set global.cni.configMap=cni-configuration \
    71       --set global.tunnel=disabled \
    72       --set global.masquerade=false \
    73       > cilium.yaml
    74     kubectl create -f cilium.yaml
    75  
    76  This will create both the main cilium daemonset, as well as the cilium-node-init daemonset, which handles tasks like mounting the BPF filesystem and updating the
    77  existing Azure CNI plugin to run in 'transparent' mode.