Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ZH translation /docs/tasks/federation/federation-service-discover… #16678

Conversation

@tanjunchen
Copy link

commented Oct 3, 2019

No description provided.

@tanjunchen

This comment has been minimized.

Copy link
Author

commented Oct 3, 2019

/assign @xichengliudui

@@ -0,0 +1,508 @@
---
title: 使用联合服务的跨集群服务发现

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
title: 使用联合服务的跨集群服务发现
title: 使用联合服务来实现跨集群的服务发现
a common Service across multiple Kubernetes clusters. This makes it
easy to achieve cross-cluster service discovery and availability zone
fault tolerance for your Kubernetes applications. -->
本指南说明了如何使用 Kubernetes 联合服务跨多个 Kubernetes 集群部署通用服务。这样可以轻松实现 Kubernetes 应用程序的跨集群服务发现和可用性区域容错。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member

AZ avail zone, 直接翻译成 可用区 就行了

a common Service across multiple Kubernetes clusters. This makes it
easy to achieve cross-cluster service discovery and availability zone
fault tolerance for your Kubernetes applications. -->
本指南说明了如何使用 Kubernetes 联合服务跨多个 Kubernetes 集群部署通用服务。这样可以轻松实现 Kubernetes 应用程序的跨集群服务发现和可用性区域容错。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
本指南说明了如何使用 Kubernetes 联合服务跨多个 Kubernetes 集群部署通用服务。这样可以轻松实现 Kubernetes 应用程序的跨集群服务发现和可用性区域容错
本指南说明了如何使用 Kubernetes 联合服务跨多个 Kubernetes 集群部署通用服务。这样可以轻松实现 Kubernetes 应用程序的跨集群服务发现和可用区容错
Federation API endpoint, rather than a Kubernetes cluster API
endpoint. The API for Federated Services is 100% compatible with the
API for traditional Kubernetes Services. -->
联合服务的创建与传统服务几乎相同[Kubernetes Services](/docs/concepts/services-networking/service/)即通过 API 调用来指定所需的服务属性。对于联合服务,此 API 调用定向到联合身份验证 API 接入点,而不是 Kubernetes 集群 API 接入点。联合服务的 API 与传统 Kubernetes 服务的 API 是100%兼容的。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
联合服务的创建与传统服务几乎相同[Kubernetes Services](/docs/concepts/services-networking/service/)即通过 API 调用来指定所需的服务属性。对于联合服务,此 API 调用定向到联合身份验证 API 接入点,而不是 Kubernetes 集群 API 接入点。联合服务的 API 与传统 Kubernetes 服务的 API 100%兼容的。
联合服务的创建与传统服务几乎相同 [Kubernetes Services](/docs/concepts/services-networking/service/) 即通过 API 调用来指定所需的服务属性。对于联合服务,此 API 调用定向到联合身份验证 API 接入点,而不是 Kubernetes 集群 API 接入点。联合服务的 API 与传统 Kubernetes 服务的 API 100% 兼容的。
of your federated service can seamlessly locate an appropriate healthy service endpoint at all times, even in the event of cluster,
availability zone or regional outages. -->
1. 在基础集群联合的每个集群中创建匹配的 Kubernetes 服务,
2. 监视那些服务 "分片"(及其驻留的集群)的运行状况, and

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
2. 监视那些服务 "分片"(及其驻留的集群)的运行状况, and
2. 监视那些服务 "分片"(及其驻留的集群)的运行状况, 以及
automatically find the local shard of the Federated Service in their
cluster if it exists and is healthy, or the closest healthy shard in a
different cluster if it does not. -->
如果存在健康的分片,联合 Kubernetes 集群(即Pods)中的客户端将自动在其中找到联合服务的本地分片集群或者集群中最接近的健康分片;如果不存在健康的分片,则使用其他群集。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
如果存在健康的分片,联合 Kubernetes 集群(即Pods)中的客户端将自动在其中找到联合服务的本地分片集群或者集群中最接近的健康分片;如果不存在健康的分片,则使用其他群集
如果存在健康的分片,联合 Kubernetes 集群(即 Pods )中的客户端将自动在其中找到联合服务的本地分片集群或者集群中最接近的健康分片;如果不存在,则使用最接近的其他集群的健康分片
this for you). Other tutorials, for example
[this one](https://github.com/kelseyhightower/kubernetes-cluster-federation)
by Kelsey Hightower, are also available to help you. -->
本指南假设您已经安装 Kubernetes 联合集群。如果没有,则访问[federation admin guide](/docs/admin/federation/)了解如何建立联合集群(或让您的集群管理员为您执行此操作)。其他教程,例如 Kelsey Hightower 编写的[案例](https://github.com/kelseyhightower/kubernetes-cluster-federation)或许有用。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
本指南假设您已经安装 Kubernetes 联合集群。如果没有,则访问[federation admin guide](/docs/admin/federation/)了解如何建立联合集群(或让您的集群管理员为您执行此操作)。其他教程,例如 Kelsey Hightower 编写的[案例](https://github.com/kelseyhightower/kubernetes-cluster-federation)或许有用。
本指南假设您已经安装 Kubernetes 联合集群。如果没有,则访问[联合集群管理指南](/docs/admin/federation/)了解如何建立联合集群(或让您的集群管理员为您执行此操作)。其他教程,例如 Kelsey Hightower 编写的[案例](https://github.com/kelseyhightower/kubernetes-cluster-federation)或许有用。
<!-- You should also have a basic
[working knowledge of Kubernetes](/docs/tutorials/kubernetes-basics/) in
general, and [Services](/docs/concepts/services-networking/service/) in particular. -->
一般而言,您应该还有基本的[Kubernetes 工作常识](/docs/tutorials/kubernetes-basics/),特别是[Services](/docs/concepts/services-networking/service/)。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
一般而言,您应该还有基本的[Kubernetes 工作常识](/docs/tutorials/kubernetes-basics/),特别是[Services](/docs/concepts/services-networking/service/)。
一般而言,您应该还有基本的 [Kubernetes 工作常识](/docs/tutorials/kubernetes-basics/),特别是 [Services](/docs/concepts/services-networking/service/)。
```
{{< /note >}} -->
{{< note >}}
如果您的联邦配置为使用 AWS Route53,则可以使用等效的 AWS 工具,例如:

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
如果您的联邦配置为使用 AWS Route53,则可以使用等效的 AWS 工具,例如:
如果您的联邦配置为使用 AWS Route53,则可以使用类似的 AWS 工具,例如:
@ns-cloud-e1.googledomains.com...`) or expect delays in the order of
your configured TTL (180 seconds, by default) before seeing updates,
due to caching by intermediate DNS servers. -->
无论使用哪种 DNS 提供程序,任何 DNS 查询工具(例如 'dig' 或者 'nslookup')当然都将允许您查看联邦会为您创建的记录。请注意,您应该将这些工具直接指向您的 DNS 提供商(例如 `dig @ ns-cloud-e1.googledomains.com ...`),或者由于中间 DNS 服务器进行了缓存,因此在看到更新之前,预计延迟会按照配置的 TTL 顺序(默认为180秒)进行。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
无论使用哪种 DNS 提供程序,任何 DNS 查询工具(例如 'dig' 或者 'nslookup')当然都将允许您查看联邦会为您创建的记录。请注意,您应该将这些工具直接指向您的 DNS 提供商(例如 `dig @ ns-cloud-e1.googledomains.com ...`),或者由于中间 DNS 服务器进行了缓存,因此在看到更新之前,预计延迟会按照配置的 TTL 顺序(默认为180)进行。
无论使用哪种 DNS 提供商,任何 DNS 查询工具(例如 'dig' 或者 'nslookup')都将允许您查看联邦会为您创建的记录。请注意,您应该将这些工具直接指向您的 DNS 提供商(例如 `dig @ ns-cloud-e1.googledomains.com ...`),或者由于中间 DNS 服务器进行了缓存,因此在看到更新之前,预计延迟会按照配置的 TTL 顺序(默认为 180)进行。
2. Similarly, there are regional 'A' records which include all healthy shards in that region. For example, 'us-central1'. These regional records are useful for clients which do not have a particular zone preference, and as a building block for the automated locality and failover mechanism described below.
3. For zones where there are currently no healthy backend endpoints, a CNAME ('Canonical Name') record is used to alias (automatically redirect) those queries to the next closest healthy zone. In the example, the service shard in us-central1-f currently has no healthy backend endpoints (that is Pods), so a CNAME record has been created to automatically redirect queries to other shards in that region (us-central1 in this case).
4. Similarly, if no healthy shards exist in the enclosing region, the search progresses further afield. In the europe-west1-d availability zone, there are no healthy backends, so queries are redirected to the broader europe-west1 region (which also has no healthy backends), and onward to the global set of healthy addresses (' nginx.mynamespace.myfederation.svc.example.com.'). -->
1. 请注意,每个具有至少一个正常后端端点的服务分片都有一条正常('A')记录。例如,在 us-central1-a 中,104.197.247.191是该区域中服务分片的外部 IP 地址,在 asia-east1-a 中,该地址是 130.211.56.221。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
1. 请注意,每个具有至少一个正常后端端点的服务分片都有一条正常('A')记录。例如,在 us-central1-a 中,104.197.247.191是该区域中服务分片的外部 IP 地址,在 asia-east1-a 中,该地址是 130.211.56.221
1. 请注意,每个具有至少一个正常后端端点的服务分片都有一条正常('A')记录。例如,在 us-central1-a 中,104.197.247.191 是该区域中服务分片的外部 IP 地址,在 asia-east1-a 中,该地址是 130.211.56.221
## 发现联合服务

<!-- ### From pods inside your federated clusters -->
### 从联合集群内的 Pods

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
### 从联合集群内的 Pods
### 从联合集群内的 Pods 来发现
"bobsservice.othernamespace" etc issued by your software running
inside Pods are automatically expanded and resolved correctly to the
appropriate service IP of services running in the local cluster. -->
默认情况下,Kubernetes 集群预先配置了本地集群 DNS 服务器('KubeDNS')以及智能构建的 DNS 搜索路径,这些路径共同确保由 Pods 内部运行软件发出的 DNS 查询如"myservice", "myservice.mynamespace","bobsservice.othernamespace"等,会自动扩展并正确解析为本地集群运行服务的相应服务 IP。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
默认情况下,Kubernetes 集群预先配置了本地集群 DNS 服务器('KubeDNS')以及智能构建的 DNS 搜索路径,这些路径共同确保由 Pods 内部运行软件发出的 DNS 查询如"myservice", "myservice.mynamespace","bobsservice.othernamespace"等,会自动扩展并正确解析为本地集群运行服务的相应服务 IP。
默认情况下,Kubernetes 集群预先配置了本地集群 DNS 服务器('KubeDNS')以及智能构建的 DNS 搜索路径,这些路径共同确保由 Pods 内部运行软件发出的 DNS 查询如 "myservice", "myservice.mynamespace","bobsservice.othernamespace" 等,会自动扩展并正确解析为本地集群运行服务的相应服务 IP。
cross-zone or cross-region networks and you incurring perhaps unwanted
network charges or latency, without you explicitly opting in to this
behavior. -->
随着联合服务和跨集群服务发现的引入,该概念已扩展到涵盖在全球集群联盟中任何其他集群中运行的 Kubernetes 服务。要利用此扩展范围,您可以使用形式稍有不同的 DNS 名称,形式为 ```"<servicename>.<namespace>.<federationname>"```来解析联合服务。例如,您可以使用 `myservice.mynamespace.myfederation`。使用不同的 DNS 名称还可以避免现有应用程序意外穿越跨区域或跨区域网络,并且可能招致不必要的网络费用或延迟,而无需您明确选择采取这种行为。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
随着联合服务和跨集群服务发现的引入,该概念已扩展到涵盖在全球集群联盟中任何其他集群中运行的 Kubernetes 服务。要利用此扩展范围,您可以使用形式稍有不同的 DNS 名称,形式为 ```"<servicename>.<namespace>.<federationname>"```来解析联合服务。例如,您可以使用 `myservice.mynamespace.myfederation`。使用不同的 DNS 名称还可以避免现有应用程序意外穿越跨区域或跨区域网络,并且可能招致不必要的网络费用或延迟,而无需您明确选择采取这种行为。
随着联合服务和跨集群服务发现的引入,该概念已扩展到涵盖在全球集群联盟中任何其他集群中运行的 Kubernetes 服务。要利用此扩展范围,您可以使用形式稍有不同的 DNS 名称,形式为 ```"<servicename>.<namespace>.<federationname>"``` 来解析联合服务。例如,您可以使用 `myservice.mynamespace.myfederation`。使用不同的 DNS 名称还可以避免现有应用程序意外穿越跨区域或跨区域网络,并且可能招致不必要的网络费用或延迟,而无需您明确选择采取这种行为。
example, and ends up at one of the external IPs of the Federated
Service in the local us-central1 region (that is 104.197.247.191,
104.197.244.180 or 104.197.245.170). -->
但是,如果服务在本地集群中不存在(或者存在但没有正常的后端 Pod),则 DNS 查询会自动扩展为 ```"nginx.mynamespace.myfederation.svc.us-central1-f.example.com"```(也就是说,从逻辑上 "找到最接近我可用区的一个分片的外部 IP")。此扩展由 KubeDNS 自动执行,它返回关联的 CNAME 记录。这将导致在上面的示例中自动遍历 DNS 记录的层次结构,并最终到达本地 us-central1 区域中联合服务的外部 IP 之一(即104.197.247.191,104.197.244.180或104.197.245.170)。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
但是,如果服务在本地集群中不存在(或者存在但没有正常的后端 Pod),则 DNS 查询会自动扩展为 ```"nginx.mynamespace.myfederation.svc.us-central1-f.example.com"```(也就是说,从逻辑上 "找到最接近我可用区的一个分片的外部 IP")。此扩展由 KubeDNS 自动执行,它返回关联的 CNAME 记录。这将导致在上面的示例中自动遍历 DNS 记录的层次结构,并最终到达本地 us-central1 区域中联合服务的外部 IP 之一(104.197.247.191,104.197.244.180104.197.245.170)。
但是,如果服务在本地集群中不存在(或者存在但没有正常的后端 Pod),则 DNS 查询会自动扩展为 ```"nginx.mynamespace.myfederation.svc.us-central1-f.example.com"```(也就是说,从逻辑上 "找到最接近我可用区的一个分片的外部 IP")。此扩展由 KubeDNS 自动执行,它返回关联的 CNAME 记录。这将导致在上面的示例中自动遍历 DNS 记录的层次结构,并最终到达本地 us-central1 区域中联合服务的外部 IP 之一(104.197.247.191, 104.197.244.180104.197.245.170 )。

<!-- See the [federation admin guide](/docs/admin/federation/) to learn
how to bring up a cluster federation correctly (or have your cluster administrator do this for you), and how to correctly configure your client. -->
请参阅[联合管理员指南](/docs/admin/federation/)了解如何正确启动联邦集群(或让您的集群管理员为您执行此操作),以及如何正确配置客户端。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
请参阅[联合管理员指南](/docs/admin/federation/)了解如何正确启动联邦集群(或让您的集群管理员为您执行此操作),以及如何正确配置客户端。
请参阅[联合集群管理员指南](/docs/admin/federation/)了解如何正确启动联邦集群(或让您的集群管理员为您执行此操作),以及如何正确配置客户端。
how to configure your Cluster Federation system's DNS provider (or have your cluster administrator do this for you).
2. Confirm that the Cluster Federation's service-controller is successfully connecting to and authenticating against your selected DNS provider (look for `service-controller` errors or successes in the output of `kubectl logs federation-controller-manager --namespace federation`).
3. Confirm that the Cluster Federation's service-controller is successfully creating DNS records in your DNS provider (or outputting errors in its logs explaining in more detail what's failing). -->
1. 您的联邦名称,DNS 提供程序,DNS 域名已正确配置。请参阅[联邦管理指南](/docs/admin/federation/)或者[教程](https://github.com/kelseyhightower/kubernetes-cluster-federation)了解如何配置联合集群系统的 DNS 提供程序(或让您的集群管理员为您执行此操作)。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
1. 您的联邦名称,DNS 提供程序,DNS 域名已正确配置。请参阅[联邦管理指南](/docs/admin/federation/)或者[教程](https://github.com/kelseyhightower/kubernetes-cluster-federation)了解如何配置联合集群系统的 DNS 提供程序(或让您的集群管理员为您执行此操作)。
1. 您的联邦集群名称,DNS 提供程序,DNS 域名已正确配置。请参阅[联邦集群管理指南](/docs/admin/federation/)或者[教程](https://github.com/kelseyhightower/kubernetes-cluster-federation)了解如何配置联合集群系统的 DNS 提供程序(或让您的集群管理员为您执行此操作)。
检查:

<!-- 1. The DNS registrar that manages your federation DNS domain has been correctly configured to point to your configured DNS provider's nameservers. See for example [Google Domains Documentation](https://support.google.com/domains/answer/3290309?hl=en&ref_topic=3251230) and [Google Cloud DNS Documentation](https://cloud.google.com/dns/update-name-servers), or equivalent guidance from your domain registrar and DNS provider. -->
1. 已正确配置用于管理联合 DNS 域名的 DNS 注册器,使其指向已配置的 DNS 提供程序的名称服务器。例如,请参见[Google Domains Documentation](https://support.google.com/domains/answer/3290309?hl=en&ref_topic=3251230)与[Google Cloud DNS Documentation](https://cloud.google.com/dns/update-name-servers),或者域名注册商和 DNS 提供商的等效指南。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
1. 已正确配置用于管理联合 DNS 域名的 DNS 注册器,使其指向已配置的 DNS 提供程序的名称服务器。例如,请参见[Google Domains Documentation](https://support.google.com/domains/answer/3290309?hl=en&ref_topic=3251230)与[Google Cloud DNS Documentation](https://cloud.google.com/dns/update-name-servers),或者域名注册商和 DNS 提供商的等效指南。
1. 已正确配置用于管理联合 DNS 域名的 DNS 注册器,使其指向已配置的 DNS 提供程序的名称服务器。例如,请参见[Google Domains 文档](https://support.google.com/domains/answer/3290309?hl=en&ref_topic=3251230)与[Google Cloud DNS 文档](https://cloud.google.com/dns/update-name-servers),或者域名注册商和 DNS 提供商的等效指南。
Copy link
Member

left a comment

提了一些建议。Thanks!

@chenrui333

This comment has been minimized.

Copy link
Member

commented Oct 3, 2019

/assign

@tanjunchen tanjunchen force-pushed the tanjunchen:ZH-translation-/docs/tasks/federation/federation-service-discovery.md branch from 3fc94f0 to 32d11fd Oct 4, 2019
@tanjunchen

This comment has been minimized.

Copy link
Author

commented Oct 4, 2019

@chenrui333 Thank you very much for your comments . I will take it.

@tanjunchen

This comment has been minimized.

Copy link
Author

commented Oct 4, 2019

/assign @chenrui333

@tanjunchen

This comment has been minimized.

Copy link
Author

commented Oct 4, 2019

@chenrui333 Can you help me review translation-zh? Thanks!!!

@tanjunchen tanjunchen force-pushed the tanjunchen:ZH-translation-/docs/tasks/federation/federation-service-discovery.md branch from 32d11fd to 15c2fb1 Oct 4, 2019
@tanjunchen

This comment has been minimized.

Copy link
Author

commented Oct 4, 2019

@tanjunchen tanjunchen force-pushed the tanjunchen:ZH-translation-/docs/tasks/federation/federation-service-discovery.md branch from 15c2fb1 to 9e04461 Oct 4, 2019
Copy link
Member

left a comment

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm label Oct 7, 2019
@chenrui333

This comment has been minimized.

Copy link
Member

commented Oct 7, 2019

@tanjunchen 谢谢你的贡献!!

@markthink

This comment has been minimized.

Copy link
Member

commented Oct 7, 2019

/retest

4 similar comments
@markthink

This comment has been minimized.

Copy link
Member

commented Oct 7, 2019

/retest

@markthink

This comment has been minimized.

Copy link
Member

commented Oct 7, 2019

/retest

@markthink

This comment has been minimized.

Copy link
Member

commented Oct 7, 2019

/retest

@markthink

This comment has been minimized.

Copy link
Member

commented Oct 7, 2019

/retest

Copy link
Member

left a comment

/lgtm
/approve

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Oct 7, 2019

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: chenrui333, markthink
To complete the pull request process, please assign zhangxiaoyu-zidif
You can assign the PR to them by writing /assign @zhangxiaoyu-zidif in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@markthink markthink merged commit 323ff6e into kubernetes:release-1.14 Oct 7, 2019
1 of 7 checks passed
1 of 7 checks passed
Header rules Deploy failed
Details
Mixed content Deploy failed
Details
Pages changed Deploy failed
Details
Redirect rules Deploy failed
Details
deploy/netlify Deploy preview failed.
Details
tide Not mergeable. Needs approved label.
Details
cla/linuxfoundation tanjunchen authorized
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.