From 5bee76f2528a6e703fc487c25ab7748af013aa9c Mon Sep 17 00:00:00 2001 From: Xinnan Wen Date: Thu, 28 Nov 2019 16:51:10 -0800 Subject: [PATCH] Fix cni doc (#5886) * Fix cni doc * Address comment * add more fixes --- .../docs/setup/additional-setup/cni/index.md | 36 +++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/content/en/docs/setup/additional-setup/cni/index.md b/content/en/docs/setup/additional-setup/cni/index.md index afe7d897e1..d8d33d34af 100644 --- a/content/en/docs/setup/additional-setup/cni/index.md +++ b/content/en/docs/setup/additional-setup/cni/index.md @@ -74,7 +74,7 @@ or the corresponding path in a custom overlay file. ### Excluding specific Kubernetes namespaces -This example uses Helm to perform the following tasks: +This example uses `Istioctl` to perform the following tasks: * Install the Istio CNI plugin. * Configure its log level. @@ -83,17 +83,33 @@ This example uses Helm to perform the following tasks: * `foo_ns` * `bar_ns` -Refer to the [Customizable Install with Helm](/docs/setup/install/helm) for complete instructions. +Refer to the [Customizable Install with `Istioctl`](/docs/setup/install/istioctl) for complete instructions. Use the following command to render and apply Istio CNI components and override the default configuration of the `logLevel` and `excludeNamespaces` parameters for `istio-cni`: +Create a `IstioControlPlane` CR yaml locally with your override to install `istio`, e.g. `cni.yaml` + +{{< text yaml >}} +apiVersion: install.istio.io/v1alpha2 +kind: IstioControlPlane +spec: + cni: + enabled: true + values: + cni: + excludeNamespaces: + - istio-system + - kube-system + - foo_ns + - bar_ns + unvalidatedValues: + cni: + logLevel: info +{{< /text >}} + {{< text bash >}} -$ istioctl manifest apply \ - --set - --set cni.enabled=true \ - --set values.cni.logLevel=info \ - --set values.cni.excludeNamespaces={"istio-system,kube-system,foo_ns,bar_ns"} +$ istioctl manifest apply -f cni.yaml {{< /text >}} ### Hosted Kubernetes settings @@ -121,11 +137,11 @@ The following table shows the required settings for many common Kubernetes envir For existing clusters, this redeploys all nodes. {{< /warning >}} -1. Install Istio CNI via Helm including the `--set cniBinDir=/home/kubernetes/bin` option. - For example, the following `helm install` command sets the `cniBinDir` value for a GKE cluster: +1. Install Istio CNI via `Istioctl` including the `--set cniBinDir=/home/kubernetes/bin` option. + For example, the following `istioctl manifest` command sets the `cniBinDir` value for a GKE cluster: {{< text bash >}} - $ helm install install/kubernetes/helm/istio-cni --name=istio-cni --namespace=kube-system --set cniBinDir=/home/kubernetes/bin + $ istioctl manifest apply --set cniBinDir=/home/kubernetes/bin {{< /text >}} ## Sidecar injection compatibility