sync en /docs/concepts/services-networking/endpoint-slices.md and /docs/contribute/generate-ref-docs/kubernetes-components.md (#18314)

pull/18324/head
chentanjun 2019-12-27 09:31:38 +08:00 committed by Kubernetes Prow Robot
parent fb16416dc5
commit 80f2bb1ec3
2 changed files with 29 additions and 14 deletions

View File

@ -28,7 +28,7 @@ weight: 10
{{% capture overview %}}
{{< feature-state for_k8s_version="v1.16" state="alpha" >}}
{{< feature-state for_k8s_version="v1.17" state="beta" >}}
<!--
_Endpoint Slices_ provide a simple way to track network endpoints within a
@ -44,7 +44,7 @@ _Endpoint Slices_ 提供了一种简单的方法来跟踪 Kubernetes 集群中
<!--
## Endpoint Slice resources {#endpointslice-resource}
In Kubernetes, an Endpoint Slice contains references to a set of network
In Kubernetes, an EndpointSlice contains references to a set of network
endpoints. The EndpointSlice controller automatically creates Endpoint Slices
for a Kubernetes Service when a selector is specified. These Endpoint Slices
will include references to any Pods that match the Service selector. Endpoint
@ -55,18 +55,18 @@ Kubernetes Service.
-->
## Endpoint Slice 资源 {#endpointslice-resource}
在 Kubernetes 中,`Endpoint Slice`包含对一组网络端点的引用。指定选择器后EndpointSlice 控制器会自动为 Kubernetes 服务创建 Endpoint Slices。这些 Endpoint Slices 将包含对与服务选择器匹配的所有 Pod 的引用。Endpoint Slices 通过唯一的服务和端口组合将网络端点组织在一起。
在 Kubernetes 中,`EndpointSlice` 包含对一组网络端点的引用。指定选择器后EndpointSlice 控制器会自动为 Kubernetes 服务创建 EndpointSlice。这些 EndpointSlice 将包含对与服务选择器匹配的所有 Pod 的引用。EndpointSlice 通过唯一的服务和端口组合将网络端点组织在一起。
例如,这里是 Kubernetes服务 `example` 的示例 EndpointSlice 资源。
```yaml
apiVersion: discovery.k8s.io/v1alpha1
apiVersion: discovery.k8s.io/v1beta1
kind: EndpointSlice
metadata:
name: example-abc
labels:
kubernetes.io/service-name: example
addressType: IP
addressType: IPv4
ports:
- name: http
protocol: TCP
@ -74,7 +74,6 @@ ports:
endpoints:
- addresses:
- "10.1.2.3"
- "2001:db8::1234:5678"
conditions:
ready: true
hostname: pod-1
@ -92,6 +91,14 @@ Endpoint Slices can act as the source of truth for kube-proxy when it comes to
how to route internal traffic. When enabled, they should provide a performance
improvement for services with large numbers of endpoints.
## Address Types
EndpointSlices support three address types:
* IPv4
* IPv6
* FQDN (Fully Qualified Domain Name)
## Motivation
The Endpoints API has provided a simple and straightforward way of
@ -112,6 +119,14 @@ platform for additional features such as topological routing.
当涉及如何路由内部流量时Endpoint Slices 可以充当 kube-proxy 的真实来源。启用该功能后,在服务的 endpoints 规模庞大时会有可观的性能提升。
## Address Types
EndpointSlice 支持三种地址类型:
* IPv4
* IPv6
* FQDN (完全合格的域名)
## 动机
Endpoints API 提供了一种简单明了的方法在 Kubernetes 中跟踪网络端点。不幸的是,随着 Kubernetes 集群与服务的增长,该 API 的局限性变得更加明显。最值得注意的是,这包含了扩展到更多网络端点的挑战。

View File

@ -243,10 +243,10 @@ to `kubernetes/website`.
当 Markdown 文件放入 `kubernetes/website` 仓库的本地目录中后,你就可以创建 [PR](/docs/home/contribute/create-pull-request/) 将它们提交到 `kubernetes/website`
<!--
## Customizing the config file
## Customizing the reference.yml config file
-->
## 自定义配置文件
## 自定义 reference.yml 配置文件
<!--
Open `<web-base>/update-imported-docs/reference.yml` for editing.
@ -256,24 +256,24 @@ what it is doing and need to change the specified release branch.
打开 `<web-base>/update-imported-docs/reference.yml` 进行编辑。不要修改 `generate-command` 条目的内容,除非你了解它的作用,并且需要修改指定的已发布分支。
```shell
```yaml
repos:
- name: reference-docs
remote: https://github.com/kubernetes-incubator/reference-docs.git
remote: https://github.com/kubernetes-sigs/reference-docs.git
# This and the generate-command below needs a change when reference-docs has
# branches properly defined
branch: master
branch: master
generate-command: |
cd $GOPATH
git clone https://github.com/kubernetes/kubernetes.git src/k8s.io/kubernetes
cd src/k8s.io/kubernetes
git checkout release-1.11
git checkout release-1.17
make generated_files
cp -L -R vendor $GOPATH/src
rm -r vendor
cd $GOPATH
go get -v github.com/kubernetes-incubator/reference-docs/gen-compdocs
cd src/github.com/kubernetes-incubator/reference-docs/
go get -v github.com/kubernetes-sigs/reference-docs/gen-compdocs
cd src/github.com/kubernetes-sigs/reference-docs/
make comp
```