From ff13ccc5b2f8a32a06500ec582ac0de19309bbf2 Mon Sep 17 00:00:00 2001 From: egrosdou01 Date: Fri, 29 Nov 2024 10:53:46 +0100 Subject: [PATCH] docs: update the Cilium CNI deployment Upate the job method. Signed-off-by: egrosdou01 Signed-off-by: Andrey Smirnov --- .../network/deploying-cilium.md | 27 ++++++++++++------- .../network/deploying-cilium.md | 27 ++++++++++++------- 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/website/content/v1.8/kubernetes-guides/network/deploying-cilium.md b/website/content/v1.8/kubernetes-guides/network/deploying-cilium.md index 586b0da6d3..ec4d9dfeba 100644 --- a/website/content/v1.8/kubernetes-guides/network/deploying-cilium.md +++ b/website/content/v1.8/kubernetes-guides/network/deploying-cilium.md @@ -282,7 +282,8 @@ We can utilize a job pattern run arbitrary logic during bootstrap time. We can leverage this to our advantage to install Cilium by using an inline manifest as shown in the example below: ``` yaml - inlineManifests: +cluster: + inlineManifests: - name: cilium-install contents: | --- @@ -359,14 +360,22 @@ We can leverage this to our advantage to install Cilium by using an inline manif command: - cilium - install - - --set ipam.mode=kubernetes - - --set kubeProxyReplacement=true - - --set securityContext.capabilities.ciliumAgent="{CHOWN,KILL,NET_ADMIN,NET_RAW,IPC_LOCK,SYS_ADMIN,SYS_RESOURCE,DAC_OVERRIDE,FOWNER,SETGID,SETUID}" - - --set securityContext.capabilities.cleanCiliumState="{NET_ADMIN,SYS_ADMIN,SYS_RESOURCE}" - - --set cgroup.autoMount.enabled=false - - --set cgroup.hostRoot=/sys/fs/cgroup - - --set k8sServiceHost=localhost - - --set k8sServicePort=7445 + - --set + - ipam.mode=kubernetes + - --set + - kubeProxyReplacement=true + - --set + - securityContext.capabilities.ciliumAgent="{CHOWN,KILL,NET_ADMIN,NET_RAW,IPC_LOCK,SYS_ADMIN,SYS_RESOURCE,DAC_OVERRIDE,FOWNER,SETGID,SETUID}" + - --set + - securityContext.capabilities.cleanCiliumState="{NET_ADMIN,SYS_ADMIN,SYS_RESOURCE}" + - --set + - cgroup.autoMount.enabled=false + - --set + - cgroup.hostRoot=/sys/fs/cgroup + - --set + - k8sServiceHost=localhost + - --set + - k8sServicePort=7445 ``` Because there is no CNI present at installation time the kubernetes.default.svc cannot be used to install Cilium, to overcome this limitation we'll utilize the host network connection to connect back to itself with 'hostNetwork: true' in tandem with the environment variables KUBERNETES_SERVICE_PORT and KUBERNETES_SERVICE_HOST. diff --git a/website/content/v1.9/kubernetes-guides/network/deploying-cilium.md b/website/content/v1.9/kubernetes-guides/network/deploying-cilium.md index 586b0da6d3..ec4d9dfeba 100644 --- a/website/content/v1.9/kubernetes-guides/network/deploying-cilium.md +++ b/website/content/v1.9/kubernetes-guides/network/deploying-cilium.md @@ -282,7 +282,8 @@ We can utilize a job pattern run arbitrary logic during bootstrap time. We can leverage this to our advantage to install Cilium by using an inline manifest as shown in the example below: ``` yaml - inlineManifests: +cluster: + inlineManifests: - name: cilium-install contents: | --- @@ -359,14 +360,22 @@ We can leverage this to our advantage to install Cilium by using an inline manif command: - cilium - install - - --set ipam.mode=kubernetes - - --set kubeProxyReplacement=true - - --set securityContext.capabilities.ciliumAgent="{CHOWN,KILL,NET_ADMIN,NET_RAW,IPC_LOCK,SYS_ADMIN,SYS_RESOURCE,DAC_OVERRIDE,FOWNER,SETGID,SETUID}" - - --set securityContext.capabilities.cleanCiliumState="{NET_ADMIN,SYS_ADMIN,SYS_RESOURCE}" - - --set cgroup.autoMount.enabled=false - - --set cgroup.hostRoot=/sys/fs/cgroup - - --set k8sServiceHost=localhost - - --set k8sServicePort=7445 + - --set + - ipam.mode=kubernetes + - --set + - kubeProxyReplacement=true + - --set + - securityContext.capabilities.ciliumAgent="{CHOWN,KILL,NET_ADMIN,NET_RAW,IPC_LOCK,SYS_ADMIN,SYS_RESOURCE,DAC_OVERRIDE,FOWNER,SETGID,SETUID}" + - --set + - securityContext.capabilities.cleanCiliumState="{NET_ADMIN,SYS_ADMIN,SYS_RESOURCE}" + - --set + - cgroup.autoMount.enabled=false + - --set + - cgroup.hostRoot=/sys/fs/cgroup + - --set + - k8sServiceHost=localhost + - --set + - k8sServicePort=7445 ``` Because there is no CNI present at installation time the kubernetes.default.svc cannot be used to install Cilium, to overcome this limitation we'll utilize the host network connection to connect back to itself with 'hostNetwork: true' in tandem with the environment variables KUBERNETES_SERVICE_PORT and KUBERNETES_SERVICE_HOST.