From 1c8f8cbc2f2c45dc1be4e08e5e01b3ad7f52ade3 Mon Sep 17 00:00:00 2001 From: Nathan Mittler Date: Wed, 14 Oct 2020 12:59:13 -0700 Subject: [PATCH] Update multicluster install docs with latest config. (#8305) Fixes: #8303 Fixes: #8304 --- .../docs/setup/install/multicluster/index.md | 112 +++++------------- .../docs/setup/install/multicluster/snips.sh | 78 ++---------- go.mod | 2 +- go.sum | 4 +- 4 files changed, 40 insertions(+), 156 deletions(-) diff --git a/content/en/docs/setup/install/multicluster/index.md b/content/en/docs/setup/install/multicluster/index.md index 42ee57d501..641af526db 100644 --- a/content/en/docs/setup/install/multicluster/index.md +++ b/content/en/docs/setup/install/multicluster/index.md @@ -121,14 +121,6 @@ spec: multiCluster: clusterName: cluster1 network: network1 - meshNetworks: - network1: - endpoints: - - fromRegistry: cluster1 - - fromRegistry: cluster2 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 EOF {{< /text >}} @@ -153,14 +145,6 @@ spec: multiCluster: clusterName: cluster2 network: network1 - meshNetworks: - network1: - endpoints: - - fromRegistry: cluster2 - - fromRegistry: cluster1 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 EOF {{< /text >}} @@ -225,19 +209,6 @@ spec: multiCluster: clusterName: cluster1 network: network1 - meshNetworks: - network1: - endpoints: - - fromRegistry: cluster1 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 - network2: - endpoints: - - fromRegistry: cluster2 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 EOF {{< /text >}} @@ -255,8 +226,9 @@ external attacks. Check with your cloud vendor to see what options are available. {{< text bash >}} -$ CLUSTER=cluster1 NETWORK=network1 \ - samples/multicluster/gen-eastwest-gateway.sh | \ +$ MESH=mesh1 CLUSTER=cluster1 NETWORK=network1 \ + @samples/multicluster/gen-eastwest-gateway.sh@ | \ + istioctl manifest generate -f - | \ kubectl apply --context="${CTX_CLUSTER1}" -f - {{< /text >}} @@ -268,7 +240,7 @@ same network. {{< text bash >}} $ kubectl --context="${CTX_CLUSTER1}" apply -n istio-system -f \ - samples/multicluster/expose-services.yaml + @samples/multicluster/expose-services.yaml@ {{< /text >}}

Configure cluster2 as a primary with services exposed

@@ -286,19 +258,6 @@ spec: multiCluster: clusterName: cluster2 network: network2 - meshNetworks: - network1: - endpoints: - - fromRegistry: cluster1 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 - network2: - endpoints: - - fromRegistry: cluster2 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 EOF {{< /text >}} @@ -312,14 +271,15 @@ As we did with `cluster1` above, install a gateway in `cluster2` that is dedicat to east-west traffic and expose user services. {{< text bash >}} -$ CLUSTER=cluster2 NETWORK=network2 \ - samples/multicluster/gen-eastwest-gateway.sh | \ +$ MESH=mesh1 CLUSTER=cluster2 NETWORK=network2 \ + @samples/multicluster/gen-eastwest-gateway.sh@ | \ + istioctl manifest generate -f - | \ kubectl apply --context="${CTX_CLUSTER2}" -f - {{< /text >}} {{< text bash >}} $ kubectl --context="${CTX_CLUSTER2}" apply -n istio-system -f \ - samples/multicluster/expose-services.yaml + @samples/multicluster/expose-services.yaml@ {{< /text >}}

Enable Endpoint Discovery for cluster1 and cluster2

@@ -382,14 +342,6 @@ spec: multiCluster: clusterName: cluster1 network: network1 - meshNetworks: - network1: - endpoints: - - fromRegistry: cluster1 - - fromRegistry: cluster2 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 EOF {{< /text >}} @@ -407,8 +359,9 @@ external attacks. Check with your cloud vendor to see what options are available. {{< text bash >}} -$ CLUSTER=cluster1 NETWORK=network1 \ - samples/multicluster/gen-eastwest-gateway.sh | \ +$ MESH=mesh1 CLUSTER=cluster1 NETWORK=network1 \ + @samples/multicluster/gen-eastwest-gateway.sh@ | \ + istioctl manifest generate -f - | \ kubectl apply --context="${CTX_CLUSTER1}" -f - {{< /text >}} @@ -417,7 +370,7 @@ Before we can install on `cluster2`, we need to first expose the control plane i {{< text bash >}} $ kubectl apply --context="${CTX_CLUSTER1}" -f \ - samples/multicluster/expose-istiod.yaml + @samples/multicluster/expose-istiod.yaml@ {{< /text >}}

Configure cluster2 as a remote

@@ -508,19 +461,6 @@ spec: multiCluster: clusterName: cluster1 network: network1 - meshNetworks: - network1: - endpoints: - - fromRegistry: cluster1 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 - network2: - endpoints: - - fromRegistry: cluster2 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 EOF {{< /text >}} @@ -537,8 +477,9 @@ external attacks. Check with your cloud vendor to see what options are available. {{< text bash >}} -$ CLUSTER=cluster1 NETWORK=network1 \ - samples/multicluster/gen-eastwest-gateway.sh | \ +$ MESH=mesh1 CLUSTER=cluster1 NETWORK=network1 \ + @samples/multicluster/gen-eastwest-gateway.sh@ | \ + istioctl manifest generate -f - | \ kubectl apply --context="${CTX_CLUSTER1}" -f - {{< /text >}} @@ -547,7 +488,7 @@ Before we can install on `cluster2`, we need to first expose the control plane i {{< text bash >}} $ kubectl apply --context="${CTX_CLUSTER1}" -f \ - samples/multicluster/expose-istiod.yaml + @samples/multicluster/expose-istiod.yaml@ {{< /text >}} Since the clusters are on separate networks, we also need to expose all user @@ -558,7 +499,7 @@ on the same network. {{< text bash >}} $ kubectl --context="${CTX_CLUSTER1}" apply -n istio-system -f \ - samples/multicluster/expose-services.yaml + @samples/multicluster/expose-services.yaml@ {{< /text >}}

Configure cluster2 as a remote with services exposed

@@ -599,14 +540,15 @@ As we did with `cluster1` above, install a gateway in `cluster2` that is dedicat to east-west traffic and expose user services. {{< text bash >}} -$ CLUSTER=cluster2 NETWORK=network2 \ - samples/multicluster/gen-eastwest-gateway.sh | \ +$ MESH=mesh1 CLUSTER=cluster2 NETWORK=network2 \ + @samples/multicluster/gen-eastwest-gateway.sh@ | \ + istioctl manifest generate -f - | \ kubectl apply --context="${CTX_CLUSTER2}" -f - {{< /text >}} {{< text bash >}} $ kubectl --context="${CTX_CLUSTER2}" apply -n istio-system -f \ - samples/multicluster/expose-services.yaml + @samples/multicluster/expose-services.yaml@ {{< /text >}}

Enable Endpoint Discovery for cluster2 on network2

@@ -664,10 +606,10 @@ Create the `HelloWorld` service in both clusters: {{< text bash >}} $ kubectl apply --context="${CTX_CLUSTER1}" \ - -f samples/helloworld/helloworld.yaml \ + -f @samples/helloworld/helloworld.yaml@ \ -l app=helloworld -n sample $ kubectl apply --context="${CTX_CLUSTER2}" \ - -f samples/helloworld/helloworld.yaml \ + -f @samples/helloworld/helloworld.yaml@ \ -l app=helloworld -n sample {{< /text >}} @@ -677,7 +619,7 @@ Deploy the `helloworld-v1` application to `cluster1`: {{< text bash >}} $ kubectl apply --context="${CTX_CLUSTER1}" \ - -f samples/helloworld/helloworld.yaml \ + -f @samples/helloworld/helloworld.yaml@ \ -l app=helloworld -l version=v1 -n sample {{< /text >}} @@ -697,7 +639,7 @@ Deploy the `helloworld-v2` application to `cluster2`: {{< text bash >}} $ kubectl apply --context="${CTX_CLUSTER2}" \ - -f samples/helloworld/helloworld.yaml \ + -f @samples/helloworld/helloworld.yaml@ \ -l app=helloworld -l version=v2 -n sample {{< /text >}} @@ -717,9 +659,9 @@ Deploy the `Sleep` application to both clusters: {{< text bash >}} $ kubectl apply --context="${CTX_CLUSTER1}" \ - -f samples/sleep/sleep.yaml -n sample + -f @samples/sleep/sleep.yaml@ -n sample $ kubectl apply --context="${CTX_CLUSTER2}" \ - -f samples/sleep/sleep.yaml -n sample + -f @samples/sleep/sleep.yaml@ -n sample {{< /text >}} Confirm the status `Sleep` pod on `cluster1`: diff --git a/content/en/docs/setup/install/multicluster/snips.sh b/content/en/docs/setup/install/multicluster/snips.sh index 0a3f673c08..7479bbd4ca 100644 --- a/content/en/docs/setup/install/multicluster/snips.sh +++ b/content/en/docs/setup/install/multicluster/snips.sh @@ -36,14 +36,6 @@ spec: multiCluster: clusterName: cluster1 network: network1 - meshNetworks: - network1: - endpoints: - - fromRegistry: cluster1 - - fromRegistry: cluster2 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 EOF } @@ -62,14 +54,6 @@ spec: multiCluster: clusterName: cluster2 network: network1 - meshNetworks: - network1: - endpoints: - - fromRegistry: cluster2 - - fromRegistry: cluster1 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 EOF } @@ -102,19 +86,6 @@ spec: multiCluster: clusterName: cluster1 network: network1 - meshNetworks: - network1: - endpoints: - - fromRegistry: cluster1 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 - network2: - endpoints: - - fromRegistry: cluster2 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 EOF } @@ -123,8 +94,9 @@ istioctl install --context="${CTX_CLUSTER1}" -f cluster1.yaml } snip_install_istio_9() { -CLUSTER=cluster1 NETWORK=network1 \ +MESH=mesh1 CLUSTER=cluster1 NETWORK=network1 \ samples/multicluster/gen-eastwest-gateway.sh | \ + istioctl manifest generate -f - | \ kubectl apply --context="${CTX_CLUSTER1}" -f - } @@ -144,19 +116,6 @@ spec: multiCluster: clusterName: cluster2 network: network2 - meshNetworks: - network1: - endpoints: - - fromRegistry: cluster1 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 - network2: - endpoints: - - fromRegistry: cluster2 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 EOF } @@ -165,8 +124,9 @@ istioctl install --context="${CTX_CLUSTER2}" -f cluster2.yaml } snip_install_istio_13() { -CLUSTER=cluster2 NETWORK=network2 \ +MESH=mesh1 CLUSTER=cluster2 NETWORK=network2 \ samples/multicluster/gen-eastwest-gateway.sh | \ + istioctl manifest generate -f - | \ kubectl apply --context="${CTX_CLUSTER2}" -f - } @@ -200,14 +160,6 @@ spec: multiCluster: clusterName: cluster1 network: network1 - meshNetworks: - network1: - endpoints: - - fromRegistry: cluster1 - - fromRegistry: cluster2 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 EOF } @@ -216,8 +168,9 @@ istioctl install --context="${CTX_CLUSTER1}" -f cluster1.yaml } snip_install_istio_19() { -CLUSTER=cluster1 NETWORK=network1 \ +MESH=mesh1 CLUSTER=cluster1 NETWORK=network1 \ samples/multicluster/gen-eastwest-gateway.sh | \ + istioctl manifest generate -f - | \ kubectl apply --context="${CTX_CLUSTER1}" -f - } @@ -270,19 +223,6 @@ spec: multiCluster: clusterName: cluster1 network: network1 - meshNetworks: - network1: - endpoints: - - fromRegistry: cluster1 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 - network2: - endpoints: - - fromRegistry: cluster2 - gateways: - - registryServiceName: istio-eastwestgateway.istio-system.svc.cluster.local - port: 15443 EOF } @@ -291,8 +231,9 @@ istioctl install --context="${CTX_CLUSTER1}" -f cluster1.yaml } snip_install_istio_27() { -CLUSTER=cluster1 NETWORK=network1 \ +MESH=mesh1 CLUSTER=cluster1 NETWORK=network1 \ samples/multicluster/gen-eastwest-gateway.sh | \ + istioctl manifest generate -f - | \ kubectl apply --context="${CTX_CLUSTER1}" -f - } @@ -333,8 +274,9 @@ istioctl install --context="${CTX_CLUSTER2}" -f cluster2.yaml } snip_install_istio_33() { -CLUSTER=cluster2 NETWORK=network2 \ +MESH=mesh1 CLUSTER=cluster2 NETWORK=network2 \ samples/multicluster/gen-eastwest-gateway.sh | \ + istioctl manifest generate -f - | \ kubectl apply --context="${CTX_CLUSTER2}" -f - } diff --git a/go.mod b/go.mod index cc83640dea..aba222fab5 100644 --- a/go.mod +++ b/go.mod @@ -27,6 +27,6 @@ replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.5 replace github.com/evanphx/json-patch => github.com/evanphx/json-patch v0.0.0-20190815234213-e83c0a1c26c8 require ( - istio.io/istio v0.0.0-20201012154533-734140f47c4d + istio.io/istio v0.0.0-20201014161623-394493e824eb istio.io/pkg v0.0.0-20200922180714-670b76a68558 ) diff --git a/go.sum b/go.sum index 5f387dcdd8..8a3b8766d1 100644 --- a/go.sum +++ b/go.sum @@ -1240,8 +1240,8 @@ istio.io/client-go v0.0.0-20200908160912-f99162621a1a/go.mod h1:SO65MWt7I45dvUwu istio.io/gogo-genproto v0.0.0-20190930162913-45029607206a/go.mod h1:OzpAts7jljZceG4Vqi5/zXy/pOg1b209T3jb7Nv5wIs= istio.io/gogo-genproto v0.0.0-20200908160912-66171252e3db h1:btPv5pCusFxbWrmiLNLEThH8IzWunUeZ1r5M1O22vBc= istio.io/gogo-genproto v0.0.0-20200908160912-66171252e3db/go.mod h1:OzpAts7jljZceG4Vqi5/zXy/pOg1b209T3jb7Nv5wIs= -istio.io/istio v0.0.0-20201012154533-734140f47c4d h1:NW/YEQjV0OP5kcvPI0fDBspcBRpPLs7/lT6bpKbCen0= -istio.io/istio v0.0.0-20201012154533-734140f47c4d/go.mod h1:n59p7xMgvBvXo3SB//vRIn4bWWGI5FVx6DtKmgV2KfE= +istio.io/istio v0.0.0-20201014161623-394493e824eb h1:TtFRcM8eYDPvZOArA1Ykne9JMzXSPMPBOqVnoT/oUUM= +istio.io/istio v0.0.0-20201014161623-394493e824eb/go.mod h1:bOY51cI9r95WV7gSP4r/bWzaxcCjaXuNGBvLEJQ0wJc= istio.io/pkg v0.0.0-20200922180714-670b76a68558 h1:ATDshla3gX4b0X8oMs0rrFry9qJshrzTnFkBV42CcFk= istio.io/pkg v0.0.0-20200922180714-670b76a68558/go.mod h1:p6wktGBjkjL3spRSsyfOh0XkuKb8IuBX61rERHfmSbU= k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8=