mirror of https://github.com/istio/istio.io.git
Sync multicluster doc updates into Chinese (#15983)
This commit is contained in:
parent
baf2a3da9d
commit
c914c88086
|
@ -85,6 +85,11 @@ $ export CTX_CLUSTER2=<your cluster2 context>
|
|||
|
||||
- [在不同的网络上,主从架构的安装](/zh/docs/setup/install/multicluster/primary-remote_multi-network)
|
||||
|
||||
{{< tip >}}
|
||||
如果您计划使用 Helm 安装 Istio 多集群,请首先遵循 Helm 安装指南中的
|
||||
[Helm 先决条件](/zh/docs/setup/install/helm/#prerequisites)。
|
||||
{{< /tip >}}
|
||||
|
||||
{{< tip >}}
|
||||
对于跨越两个以上集群的网格,您可能需要使用一个以上的选项。
|
||||
例如,每个 region 一个主集群(即:多主)。每个 zone 一个从集群,并使用 region 主集群(即:主从)的控制平面。
|
||||
|
|
|
@ -25,7 +25,13 @@ owner: istio/wg-environments-maintainers
|
|||
|
||||
## 将 `cluster1` 设为主集群 {#configure-cluster1-as-a-primary}
|
||||
|
||||
为 `cluster1` 创建 Istio 配置文件:
|
||||
为 `cluster1` 创建 `istioctl` 配置:
|
||||
|
||||
{{< tabset category-name="multicluster-install-type-cluster-1" >}}
|
||||
|
||||
{{< tab name="IstioOperator" category-value="iop" >}}
|
||||
|
||||
使用 istioctl 和 `IstioOperator` API 在 `cluster1` 中将 Istio 安装为主节点。
|
||||
|
||||
{{< text bash >}}
|
||||
$ cat <<EOF > cluster1.yaml
|
||||
|
@ -47,9 +53,36 @@ EOF
|
|||
$ istioctl install --context="${CTX_CLUSTER1}" -f cluster1.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{< /tab >}}
|
||||
{{< tab name="Helm" category-value="helm" >}}
|
||||
|
||||
使用以下 Helm 命令在 `cluster1` 中将 Istio 安装为主节点:
|
||||
|
||||
在 `cluster1` 中安装 `base` Chart:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm install istio-base istio/base -n istio-system --kube-context "${CTX_CLUSTER1}"
|
||||
{{< /text >}}
|
||||
|
||||
然后,使用以下多集群设置在 `cluster1` 中安装 `istiod` Chart:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm install istiod istio/istiod -n istio-system --kube-context "${CTX_CLUSTER1}" --set global.meshID=mesh1 --set global.multiCluster.clusterName=cluster1 --set global.network=network1
|
||||
{{< /text >}}
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
## 将 `cluster2` 设为主集群 {#configure-cluster2-as-a-primary}
|
||||
|
||||
为 `cluster2` 创建 Istio 配置文件:
|
||||
为 `cluster2` 创建 `istioctl` 配置:
|
||||
|
||||
{{< tabset category-name="multicluster-install-type-cluster-2" >}}
|
||||
|
||||
{{< tab name="IstioOperator" category-value="iop" >}}
|
||||
|
||||
使用 istioctl 和 `IstioOperator` API 在 `cluster2` 中将 Istio 安装为主节点。
|
||||
|
||||
{{< text bash >}}
|
||||
$ cat <<EOF > cluster2.yaml
|
||||
|
@ -71,6 +104,27 @@ EOF
|
|||
$ istioctl install --context="${CTX_CLUSTER2}" -f cluster2.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{< /tab >}}
|
||||
{{< tab name="Helm" category-value="helm" >}}
|
||||
|
||||
使用以下 Helm 命令在 `cluster2` 中将 Istio 安装为主节点:
|
||||
|
||||
在 `cluster2` 中安装 `base` Chart:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm install istio-base istio/base -n istio-system --kube-context "${CTX_CLUSTER2}"
|
||||
{{< /text >}}
|
||||
|
||||
然后,使用以下多集群设置在 `cluster2` 中安装 `istiod` Chart:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm install istiod istio/istiod -n istio-system --kube-context "${CTX_CLUSTER2}" --set global.meshID=mesh1 --set global.multiCluster.clusterName=cluster2 --set global.network=network1
|
||||
{{< /text >}}
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
## 开启端点发现 {#enable-endpoint-discovery}
|
||||
|
||||
在 `cluster2` 中安装从集群的 secret,该 secret 提供 `cluster1` 的 API 服务器的访问权限。
|
||||
|
@ -99,16 +153,67 @@ $ istioctl create-remote-secret \
|
|||
|
||||
## 清理 {#cleanup}
|
||||
|
||||
1. 卸载 `cluster1` 中的 Istio:
|
||||
使用与安装 Istio 相同的机制(istioctl 或 Helm)从
|
||||
`cluster1` 和 `cluster2` 中卸载 Istio。
|
||||
|
||||
{{< text syntax=bash snip_id=none >}}
|
||||
$ istioctl uninstall --context="${CTX_CLUSTER1}" -y --purge
|
||||
$ kubectl delete ns istio-system --context="${CTX_CLUSTER1}"
|
||||
{{< /text >}}
|
||||
{{< tabset category-name="multicluster-uninstall-type-cluster-1" >}}
|
||||
|
||||
1. 卸载 `cluster2` 中的 Istio:
|
||||
{{< tab name="IstioOperator" category-value="iop" >}}
|
||||
|
||||
{{< text syntax=bash snip_id=none >}}
|
||||
$ istioctl uninstall --context="${CTX_CLUSTER2}" -y --purge
|
||||
$ kubectl delete ns istio-system --context="${CTX_CLUSTER2}"
|
||||
{{< /text >}}
|
||||
在 `cluster1` 中卸载 Istio:
|
||||
|
||||
{{< text syntax=bash snip_id=none >}}
|
||||
$ istioctl uninstall --context="${CTX_CLUSTER1}" -y --purge
|
||||
$ kubectl delete ns istio-system --context="${CTX_CLUSTER1}"
|
||||
{{< /text >}}
|
||||
|
||||
在 `cluster2` 中卸载 Istio:
|
||||
|
||||
{{< text syntax=bash snip_id=none >}}
|
||||
$ istioctl uninstall --context="${CTX_CLUSTER2}" -y --purge
|
||||
$ kubectl delete ns istio-system --context="${CTX_CLUSTER2}"
|
||||
{{< /text >}}
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Helm" category-value="helm" >}}
|
||||
|
||||
从 `cluster1` 中删除 Istio Helm 安装:
|
||||
|
||||
{{< text syntax=bash >}}
|
||||
$ helm delete istiod -n istio-system --kube-context "${CTX_CLUSTER1}"
|
||||
$ helm delete istio-base -n istio-system --kube-context "${CTX_CLUSTER1}"
|
||||
{{< /text >}}
|
||||
|
||||
从 `cluster1` 中删除 `istio-system` 命名空间:
|
||||
|
||||
{{< text syntax=bash >}}
|
||||
$ kubectl delete ns istio-system --context="${CTX_CLUSTER1}"
|
||||
{{< /text >}}
|
||||
|
||||
从 `cluster2` 中删除 Istio Helm 安装:
|
||||
|
||||
{{< text syntax=bash >}}
|
||||
$ helm delete istiod -n istio-system --kube-context "${CTX_CLUSTER2}"
|
||||
$ helm delete istio-base -n istio-system --kube-context "${CTX_CLUSTER2}"
|
||||
{{< /text >}}
|
||||
|
||||
从 `cluster2` 中删除 `istio-system` 命名空间:
|
||||
|
||||
{{< text syntax=bash >}}
|
||||
$ kubectl delete ns istio-system --context="${CTX_CLUSTER2}"
|
||||
{{< /text >}}
|
||||
|
||||
(可选)删除 Istio 安装的 CRD:
|
||||
|
||||
删除 CRD 会永久删除您在集群中创建的所有 Istio 资源。
|
||||
运行以下命令删除集群中安装的 Istio CRD:
|
||||
|
||||
{{< text syntax=bash snip_id=delete_crds >}}
|
||||
$ kubectl get crd -oname --context "${CTX_CLUSTER1}" | grep --color=never 'istio.io' | xargs kubectl delete --context "${CTX_CLUSTER1}"
|
||||
$ kubectl get crd -oname --context "${CTX_CLUSTER2}" | grep --color=never 'istio.io' | xargs kubectl delete --context "${CTX_CLUSTER2}"
|
||||
{{< /text >}}
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
|
Loading…
Reference in New Issue