diff --git a/docs/tutorials/access-service-across-clusters.md b/docs/tutorials/access-service-across-clusters.md index c40eff732..9b56f1e4a 100644 --- a/docs/tutorials/access-service-across-clusters.md +++ b/docs/tutorials/access-service-across-clusters.md @@ -19,7 +19,9 @@ Ensure that at least two clusters have been added to Karmada, and the container * If you use the `hack/local-up-karmada.sh` script to deploy Karmada, Karmada will have three member clusters, and the container networks of the member1 and member2 will be connected. * You can use `Submariner` or other related open source projects to connected networks between member clusters. -Note: In order to prevent routing conflicts, Pod and Service CIDRs of clusters need non-overlapping. +:::note +In order to prevent routing conflicts, Pod and Service CIDRs of clusters need non-overlapping. +::: ### Enable MultiClusterService in karmada-controller-manager @@ -178,9 +180,9 @@ spec: - name: member1 ``` -## Access the backend pods from member2 cluster +## Access the backend pods from `member2` cluster -To access the backend pods in the member1 cluster from the member2 cluster, execute the following command: +To access the backend pods in the `member1` cluster from the `member2` cluster, execute the following command: ```sh $ karmadactl exec -C member2 curl-6894f46595-c75rc -it -- sh ~ $ curl http://nginx.default @@ -189,4 +191,4 @@ Version: 1.0.0 Hostname: nginx-0 ``` -Using MultiClusterService, the pods are situated solely in the member1 cluster. However, they can be accessed from the member2 cluster using the native service name. +Using MultiClusterService, the pods are situated solely in the `member1` cluster. However, they can be accessed from the `member2` cluster using the native service name. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/access-service-across-clusters.md b/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/access-service-across-clusters.md index c40eff732..755eccb0f 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/access-service-across-clusters.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/access-service-across-clusters.md @@ -1,45 +1,47 @@ --- -title: Access service across clusters within native service +title: 通过原生 Service 跨集群访问服务 --- -In Karmada, the MultiClusterService can enable users to access services across clusters with the native service domain name, like `foo.svc`, with the aim of providing users with a seamless experience when accessing services across multiple clusters, as if they were operating within a single cluster. +在 Karmada 中,MultiClusterService 可以让用户通过原生 Service 域名(例如 `foo.svc`)跨集群访问服务,目的是让用户获得如在单个集群中访问服务般访问跨集群服务的流畅体验。 -This document provides an example of how to enable MultiClusterService for accessing service across clusters with native service. +本文档提供了这样一个案例:启用 MultiClusterService 来通过原生 Service 跨集群访问服务。 -## Prerequisites +## 前提条件 -### Karmada has been installed +### Karmada 已安装 -We can install Karmada by referring to [Quick Start](https://github.com/karmada-io/karmada#quick-start), or directly run `hack/local-up-karmada.sh` script which is also used to run our E2E cases. +您可以参考[快速入门](https://github.com/karmada-io/karmada#quick-start)安装 Karmada,或直接运行 `hack/local-up-karmada.sh` 脚本,该脚本也用于运行 E2E 测试。 -### Member Cluster Network +### 成员集群网络 -Ensure that at least two clusters have been added to Karmada, and the container networks between member clusters are connected. +确保至少已有两个集群加入 Karmada,并且成员集群之间的容器网络已连通。 -* If you use the `hack/local-up-karmada.sh` script to deploy Karmada, Karmada will have three member clusters, and the container networks of the member1 and member2 will be connected. -* You can use `Submariner` or other related open source projects to connected networks between member clusters. +* 如果您使用 `hack/local-up-karmada.sh` 脚本部署 Karmada,Karmada 中会有 3 个成员集群,并且集群 `member1` 和 `member2` 间的容器网络已连通。 +* 您可以使用 `Submariner` 或其他相关开源项目来连接成员集群之间的网络。 -Note: In order to prevent routing conflicts, Pod and Service CIDRs of clusters need non-overlapping. +:::note 注意 +为了防止路由冲突,集群中 Pod 和 Service 的 CIDR 必须互不重叠。 +::: -### Enable MultiClusterService in karmada-controller-manager +### 在 karmada-controller-manager 中启用 MultiClusterService -To enable the MultiClusterService feature in the karmada-controller-manager, run the following command: +要在 karmada-controller-manager 中启用 MultiClusterService 功能,请运行以下命令: ```shell kubectl --context karmada-host get deploy karmada-controller-manager -n karmada-system -o yaml | sed '/- --v=4/i \ - --feature-gates=MultiClusterService=true' | kubectl --context karmada-host replace -f - ``` -Please note that the MultiClusterService feature is disabled by default and can be enabled using the `--feature-gates=MultiClusterService=true` flag. +请注意,MultiClusterService 功能默认是禁用的,可以通过 `--feature-gates=MultiClusterService=true` 参数开启。 -If you prefer a more cautious approach, follow these steps: +如果您倾向于更谨慎的方法,请按照以下步骤操作: -1. Run `kubectl --context karmada-host edit deploy karmada-controller-manager -n karmada-system` -2. Check if `--feature-gates=MultiClusterService=true` is present in the `spec.template.spec.containers[0].command` field. -3. If not, add `--feature-gates=MultiClusterService=true` to enable the feature. +1. 运行 `kubectl --context karmada-host edit deploy karmada-controller-manager -n karmada-system`。 +2. 检查 `spec.template.spec.containers[0].command` 字段中是否存在 `--feature-gates=MultiClusterService=true`。 +3. 如果没有,添加 `--feature-gates=MultiClusterService=true` 来开启功能。 -## Deploy deployment in `member1` cluster +## 在 `member1` 集群中部署 Deployment -We need to deploy deployment in `member1` cluster: +我们需要在 `member1` 集群中部署 Deployment: ```yaml apiVersion: apps/v1 kind: Deployment @@ -83,7 +85,7 @@ spec: - member1 ``` -After deploying, you can check the created pods: +部署完成后,您可以检查创建的 Pod: ```sh $ karmadactl get po NAME CLUSTER READY STATUS RESTARTS AGE @@ -91,9 +93,9 @@ nginx-5c54b4855f-6sq9s member1 1/1 Running 0 28s nginx-5c54b4855f-vp948 member1 1/1 Running 0 28s ``` -## Deploy curl pod in `member2` cluster +## 在 `member2` 集群中部署 curl Pod -Let's deploy a curl pod in `member2` cluster: +让我们在 `member2` 集群中部署一个 curl Pod: ```yaml apiVersion: apps/v1 kind: Deployment @@ -138,21 +140,20 @@ spec: - member2 ``` - -After deploying, you can check the created pods: +部署完成后,您可以检查创建的 Pod: ```sh $ karmadactl get po -C member2 NAME CLUSTER READY STATUS RESTARTS AGE curl-6894f46595-c75rc member2 1/1 Running 0 15s ``` -Later, we will run the curl command in this pod. +稍后,我们将在此 Pod 中执行 curl 命令。 -## Deploy MultiClusterService and Service in Karmada +## 在 Karmada 中部署 MultiClusterService 与 Service -Now, instead of using PropagationPolicy/ClusterPropagationPolicy for the service, we utilize MultiClusterService for propagation. +现在,我们不使用 PropagationPolicy/ClusterPropagationPolicy,而是利用 MultiClusterService 来分发 Service。 -To enable multi-cluster service in Karmada, deploy the following yaml: +要在 Karmada 中启用 MultiClusterService,请部署以下 yaml: ```yaml apiVersion: v1 kind: Service @@ -178,9 +179,9 @@ spec: - name: member1 ``` -## Access the backend pods from member2 cluster +## 从 `member2` 集群访问后端 Pod -To access the backend pods in the member1 cluster from the member2 cluster, execute the following command: +要从 `member2` 集群访问 `member1` 集群中的后端 Pod,请执行以下命令: ```sh $ karmadactl exec -C member2 curl-6894f46595-c75rc -it -- sh ~ $ curl http://nginx.default @@ -189,4 +190,4 @@ Version: 1.0.0 Hostname: nginx-0 ``` -Using MultiClusterService, the pods are situated solely in the member1 cluster. However, they can be accessed from the member2 cluster using the native service name. +在此案例中,Pod 仅位于 `member1` 集群。但是,使用 MultiClusterService,就可以通过原生 Service 域名从 `member2` 集群实现跨集群访问。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md b/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md index 23d86c307..c71458449 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md @@ -15,9 +15,9 @@ CronFederatedHPA旨在在特定时间内扩展资源。当工作负载仅由Cron 您可以参考 [快速入门](https://github.com/karmada-io/karmada#quick-start) 安装 Karmada,或直接运行 `hack/local-up-karmada.sh` 脚本,该脚本也用于运行 E2E 测试。 -## 在 `member1` 和 `member2` 集群中部署工作负载 +## 在 `member1` 和 `member2` 集群中部署 Deployment -我们需要在 member1 和 member2 集群中部署 deployment(2 个副本): +我们需要在 member1 和 member2 集群中部署 Deployment(2 个副本): ```yaml apiVersion: apps/v1 kind: Deployment diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-with-custom-metrics.md b/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-with-custom-metrics.md index 695f6a277..10439d6d7 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-with-custom-metrics.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-with-custom-metrics.md @@ -113,7 +113,7 @@ hack/deploy-metrics-adapter.sh ${host_cluster_kubeconfig} ${host_cluster_context 如果您使用 `hack/local-up-karmada.sh` 脚本部署 Karmada,将默认安装 `karmada-metrics-adapter`。 -## 在 `member1` 和 `member2` 集群中部署工作负载 +## 在 `member1` 和 `member2` 集群中部署 Deployment 我们需要在 `member1` 和 `member2` 集群中部署示例 Deployment(1 个副本)和 Service。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-with-resource-metrics.md b/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-with-resource-metrics.md index 495b5f12b..3fdf6e6a5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-with-resource-metrics.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-with-resource-metrics.md @@ -94,7 +94,7 @@ hack/deploy-metrics-adapter.sh ${host_cluster_kubeconfig} ${host_cluster_context 如果您使用 `hack/local-up-karmada.sh` 脚本部署 Karmada,将默认安装 `karmada-metrics-adapter`。 -## 在 `member1` 和 `member2` 集群中部署工作负载 +## 在 `member1` 和 `member2` 集群中部署 Deployment 我们需要在 `member1` 和 `member2` 集群中部署 Deployment(1 个副本)和 Service。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-workload-with-cronfederatedhpa.md b/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-workload-with-cronfederatedhpa.md index 2c5ece8c2..5ba60b5f2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-workload-with-cronfederatedhpa.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/autoscaling-workload-with-cronfederatedhpa.md @@ -12,9 +12,9 @@ title: 使用CronFederatedHPA自动伸缩跨集群Deployment 您可以参考 [快速入门](https://github.com/karmada-io/karmada#quick-start) 安装 Karmada,或直接运行 `hack/local-up-karmada.sh` 脚本,该脚本也用于运行 E2E 测试。 -## 在 `member1` 和 `member2` 集群中部署工作负载 +## 在 `member1` 和 `member2` 集群中部署 Deployment -我们需要在 member1 和 member2 集群中部署 deployment(2 个副本): +我们需要在 member1 和 member2 集群中部署 Deployment(2 个副本): ```yaml apiVersion: apps/v1 kind: Deployment diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md index 23d86c307..c71458449 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md @@ -15,9 +15,9 @@ CronFederatedHPA旨在在特定时间内扩展资源。当工作负载仅由Cron 您可以参考 [快速入门](https://github.com/karmada-io/karmada#quick-start) 安装 Karmada,或直接运行 `hack/local-up-karmada.sh` 脚本,该脚本也用于运行 E2E 测试。 -## 在 `member1` 和 `member2` 集群中部署工作负载 +## 在 `member1` 和 `member2` 集群中部署 Deployment -我们需要在 member1 和 member2 集群中部署 deployment(2 个副本): +我们需要在 member1 和 member2 集群中部署 Deployment(2 个副本): ```yaml apiVersion: apps/v1 kind: Deployment diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7/tutorials/autoscaling-workload-with-cronfederatedhpa.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7/tutorials/autoscaling-workload-with-cronfederatedhpa.md index 2c5ece8c2..5ba60b5f2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7/tutorials/autoscaling-workload-with-cronfederatedhpa.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7/tutorials/autoscaling-workload-with-cronfederatedhpa.md @@ -12,9 +12,9 @@ title: 使用CronFederatedHPA自动伸缩跨集群Deployment 您可以参考 [快速入门](https://github.com/karmada-io/karmada#quick-start) 安装 Karmada,或直接运行 `hack/local-up-karmada.sh` 脚本,该脚本也用于运行 E2E 测试。 -## 在 `member1` 和 `member2` 集群中部署工作负载 +## 在 `member1` 和 `member2` 集群中部署 Deployment -我们需要在 member1 和 member2 集群中部署 deployment(2 个副本): +我们需要在 member1 和 member2 集群中部署 Deployment(2 个副本): ```yaml apiVersion: apps/v1 kind: Deployment diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.8/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.8/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md index 23d86c307..c71458449 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.8/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.8/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md @@ -15,9 +15,9 @@ CronFederatedHPA旨在在特定时间内扩展资源。当工作负载仅由Cron 您可以参考 [快速入门](https://github.com/karmada-io/karmada#quick-start) 安装 Karmada,或直接运行 `hack/local-up-karmada.sh` 脚本,该脚本也用于运行 E2E 测试。 -## 在 `member1` 和 `member2` 集群中部署工作负载 +## 在 `member1` 和 `member2` 集群中部署 Deployment -我们需要在 member1 和 member2 集群中部署 deployment(2 个副本): +我们需要在 member1 和 member2 集群中部署 Deployment(2 个副本): ```yaml apiVersion: apps/v1 kind: Deployment diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.8/tutorials/autoscaling-workload-with-cronfederatedhpa.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.8/tutorials/autoscaling-workload-with-cronfederatedhpa.md index 2c5ece8c2..5ba60b5f2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.8/tutorials/autoscaling-workload-with-cronfederatedhpa.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.8/tutorials/autoscaling-workload-with-cronfederatedhpa.md @@ -12,9 +12,9 @@ title: 使用CronFederatedHPA自动伸缩跨集群Deployment 您可以参考 [快速入门](https://github.com/karmada-io/karmada#quick-start) 安装 Karmada,或直接运行 `hack/local-up-karmada.sh` 脚本,该脚本也用于运行 E2E 测试。 -## 在 `member1` 和 `member2` 集群中部署工作负载 +## 在 `member1` 和 `member2` 集群中部署 Deployment -我们需要在 member1 和 member2 集群中部署 deployment(2 个副本): +我们需要在 member1 和 member2 集群中部署 Deployment(2 个副本): ```yaml apiVersion: apps/v1 kind: Deployment diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.9/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.9/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md index 23d86c307..c71458449 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.9/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.9/tutorials/autoscaling-federatedhpa-with-cronfederatedhpa.md @@ -15,9 +15,9 @@ CronFederatedHPA旨在在特定时间内扩展资源。当工作负载仅由Cron 您可以参考 [快速入门](https://github.com/karmada-io/karmada#quick-start) 安装 Karmada,或直接运行 `hack/local-up-karmada.sh` 脚本,该脚本也用于运行 E2E 测试。 -## 在 `member1` 和 `member2` 集群中部署工作负载 +## 在 `member1` 和 `member2` 集群中部署 Deployment -我们需要在 member1 和 member2 集群中部署 deployment(2 个副本): +我们需要在 member1 和 member2 集群中部署 Deployment(2 个副本): ```yaml apiVersion: apps/v1 kind: Deployment diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.9/tutorials/autoscaling-workload-with-cronfederatedhpa.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.9/tutorials/autoscaling-workload-with-cronfederatedhpa.md index 2c5ece8c2..5ba60b5f2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.9/tutorials/autoscaling-workload-with-cronfederatedhpa.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.9/tutorials/autoscaling-workload-with-cronfederatedhpa.md @@ -12,9 +12,9 @@ title: 使用CronFederatedHPA自动伸缩跨集群Deployment 您可以参考 [快速入门](https://github.com/karmada-io/karmada#quick-start) 安装 Karmada,或直接运行 `hack/local-up-karmada.sh` 脚本,该脚本也用于运行 E2E 测试。 -## 在 `member1` 和 `member2` 集群中部署工作负载 +## 在 `member1` 和 `member2` 集群中部署 Deployment -我们需要在 member1 和 member2 集群中部署 deployment(2 个副本): +我们需要在 member1 和 member2 集群中部署 Deployment(2 个副本): ```yaml apiVersion: apps/v1 kind: Deployment