sync en /docs/concepts/services-networking/endpoint-slices.md and /docs/contribute/generate-ref-docs/kubernetes-components.md (#18314)
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
fb16416dc5
commit
80f2bb1ec3
@@ -28,7 +28,7 @@ weight: 10
|
|||||||
|
|
||||||
{{% capture overview %}}
|
{{% 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
|
_Endpoint Slices_ provide a simple way to track network endpoints within a
|
||||||
@@ -44,7 +44,7 @@ _Endpoint Slices_ 提供了一种简单的方法来跟踪 Kubernetes 集群中
|
|||||||
<!--
|
<!--
|
||||||
## Endpoint Slice resources {#endpointslice-resource}
|
## 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
|
endpoints. The EndpointSlice controller automatically creates Endpoint Slices
|
||||||
for a Kubernetes Service when a selector is specified. These 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
|
will include references to any Pods that match the Service selector. Endpoint
|
||||||
@@ -55,18 +55,18 @@ Kubernetes Service.
|
|||||||
-->
|
-->
|
||||||
## Endpoint Slice 资源 {#endpointslice-resource}
|
## 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 资源。
|
例如,这里是 Kubernetes服务 `example` 的示例 EndpointSlice 资源。
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: discovery.k8s.io/v1alpha1
|
apiVersion: discovery.k8s.io/v1beta1
|
||||||
kind: EndpointSlice
|
kind: EndpointSlice
|
||||||
metadata:
|
metadata:
|
||||||
name: example-abc
|
name: example-abc
|
||||||
labels:
|
labels:
|
||||||
kubernetes.io/service-name: example
|
kubernetes.io/service-name: example
|
||||||
addressType: IP
|
addressType: IPv4
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
@@ -74,7 +74,6 @@ ports:
|
|||||||
endpoints:
|
endpoints:
|
||||||
- addresses:
|
- addresses:
|
||||||
- "10.1.2.3"
|
- "10.1.2.3"
|
||||||
- "2001:db8::1234:5678"
|
|
||||||
conditions:
|
conditions:
|
||||||
ready: true
|
ready: true
|
||||||
hostname: pod-1
|
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
|
how to route internal traffic. When enabled, they should provide a performance
|
||||||
improvement for services with large numbers of endpoints.
|
improvement for services with large numbers of endpoints.
|
||||||
|
|
||||||
|
## Address Types
|
||||||
|
|
||||||
|
EndpointSlices support three address types:
|
||||||
|
|
||||||
|
* IPv4
|
||||||
|
* IPv6
|
||||||
|
* FQDN (Fully Qualified Domain Name)
|
||||||
|
|
||||||
## Motivation
|
## Motivation
|
||||||
|
|
||||||
The Endpoints API has provided a simple and straightforward way of
|
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 规模庞大时会有可观的性能提升。
|
当涉及如何路由内部流量时,Endpoint Slices 可以充当 kube-proxy 的真实来源。启用该功能后,在服务的 endpoints 规模庞大时会有可观的性能提升。
|
||||||
|
|
||||||
|
## Address Types
|
||||||
|
|
||||||
|
EndpointSlice 支持三种地址类型:
|
||||||
|
|
||||||
|
* IPv4
|
||||||
|
* IPv6
|
||||||
|
* FQDN (完全合格的域名)
|
||||||
|
|
||||||
## 动机
|
## 动机
|
||||||
|
|
||||||
Endpoints API 提供了一种简单明了的方法在 Kubernetes 中跟踪网络端点。不幸的是,随着 Kubernetes 集群与服务的增长,该 API 的局限性变得更加明显。最值得注意的是,这包含了扩展到更多网络端点的挑战。
|
Endpoints API 提供了一种简单明了的方法在 Kubernetes 中跟踪网络端点。不幸的是,随着 Kubernetes 集群与服务的增长,该 API 的局限性变得更加明显。最值得注意的是,这包含了扩展到更多网络端点的挑战。
|
||||||
|
|||||||
@@ -243,10 +243,10 @@ to `kubernetes/website`.
|
|||||||
当 Markdown 文件放入 `kubernetes/website` 仓库的本地目录中后,你就可以创建 [PR](/docs/home/contribute/create-pull-request/) 将它们提交到 `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.
|
Open `<web-base>/update-imported-docs/reference.yml` for editing.
|
||||||
@@ -256,10 +256,10 @@ what it is doing and need to change the specified release branch.
|
|||||||
|
|
||||||
打开 `<web-base>/update-imported-docs/reference.yml` 进行编辑。不要修改 `generate-command` 条目的内容,除非你了解它的作用,并且需要修改指定的已发布分支。
|
打开 `<web-base>/update-imported-docs/reference.yml` 进行编辑。不要修改 `generate-command` 条目的内容,除非你了解它的作用,并且需要修改指定的已发布分支。
|
||||||
|
|
||||||
```shell
|
```yaml
|
||||||
repos:
|
repos:
|
||||||
- name: reference-docs
|
- 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
|
# This and the generate-command below needs a change when reference-docs has
|
||||||
# branches properly defined
|
# branches properly defined
|
||||||
branch: master
|
branch: master
|
||||||
@@ -267,13 +267,13 @@ repos:
|
|||||||
cd $GOPATH
|
cd $GOPATH
|
||||||
git clone https://github.com/kubernetes/kubernetes.git src/k8s.io/kubernetes
|
git clone https://github.com/kubernetes/kubernetes.git src/k8s.io/kubernetes
|
||||||
cd src/k8s.io/kubernetes
|
cd src/k8s.io/kubernetes
|
||||||
git checkout release-1.11
|
git checkout release-1.17
|
||||||
make generated_files
|
make generated_files
|
||||||
cp -L -R vendor $GOPATH/src
|
cp -L -R vendor $GOPATH/src
|
||||||
rm -r vendor
|
rm -r vendor
|
||||||
cd $GOPATH
|
cd $GOPATH
|
||||||
go get -v github.com/kubernetes-incubator/reference-docs/gen-compdocs
|
go get -v github.com/kubernetes-sigs/reference-docs/gen-compdocs
|
||||||
cd src/github.com/kubernetes-incubator/reference-docs/
|
cd src/github.com/kubernetes-sigs/reference-docs/
|
||||||
make comp
|
make comp
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user