-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding initial EndpointSlice documentation
- Loading branch information
Showing
2 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
97 changes: 97 additions & 0 deletions
97
content/en/docs/concepts/services-networking/endpointslice.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
reviewers: | ||
- freehan | ||
title: Endpoint Slice | ||
feature: | ||
title: Endpoint Slices | ||
description: > | ||
Scalable tracking of network endpoints in a Kubernetes cluster. | ||
content_template: templates/concept | ||
weight: 10 | ||
--- | ||
|
||
|
||
{{% capture overview %}} | ||
|
||
{{< glossary_definition term_id="endpointslice" length="short" >}} | ||
|
||
Endpoint Slices provide a simple way to track network endpoints within a | ||
Kubernetes cluster. Currently in alpha, they are intended to eventually replace | ||
the current Endpoints resource within Kubernetes. | ||
|
||
{{% /capture %}} | ||
|
||
{{% capture body %}} | ||
|
||
## Motivation | ||
|
||
The current Endpoints API has provided a simple and straightforward way of | ||
tracking network endpoints in Kubernetes. Unfortunately as Kubernetes clusters | ||
and Services have gotten larger, limitations of that API became more visible. | ||
Most notably, those included challenges with scaling to larger numbers of | ||
network endpoints. | ||
|
||
Since all network endpoints for a Service were stored in a single Endpoints | ||
resource, those resources could get quite large. That affected the performance | ||
of Kubernetes components like kube-proxy and resulted in significant amounts of | ||
network traffic when Endpoints changed. With kube-proxy running on each node, | ||
each Endpoints change resulted in the full resource being transmitted to each | ||
node. In some cases, Endpoints resources became large enough to hit the upper | ||
limit on the size of a single object in etcd. | ||
|
||
Endpoint Slices were designed to mitigate those issues as well as provide an | ||
extensible platform for additional features such as topological routing. | ||
|
||
## Endpoint Slice resources {#endpointslice-resource} | ||
|
||
In Kubernetes, an Endpoint Slice contains references to a set of network | ||
endpoints. Endpoint Slices are automatically created for a Kubernetes Service | ||
with a selector specified. These Endpoint Slices will include references to any | ||
Pods that match the Service selector. Endpoint Slices group network endpoints | ||
together by unique Service and Port combinations. By default, Endpoint Slices | ||
will have no more than 100 endpoints each. | ||
|
||
As an example, here's a sample EndpointSlice resource for the `example` | ||
Kubernetes service. | ||
|
||
```yaml | ||
apiVersion: discovery/v1alpha | ||
kind: EndpointSlice | ||
metadata: | ||
name: example.abc | ||
labels: | ||
kubernetes.io/service-name: example | ||
addressType: IP | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 80 | ||
endpoints: | ||
- addresses: | ||
- "10.1.2.3" | ||
- "2001:db8::1234:5678" | ||
conditions: | ||
ready: true | ||
hostname: pod-1 | ||
topology: | ||
kubernetes.io/hostname: node-1 | ||
topology.kubernetes.io/zone: us-west2-a | ||
``` | ||
## Enabling Endpoint Slices | ||
TODO(robscott) | ||
## Future work | ||
In the future, Endpoint Slices will likely be expanded to support: | ||
* Additional address types beyond IP. | ||
* More endpoint condition attributes than ready. | ||
{{% /capture %}} | ||
{{% capture whatsnext %}} | ||
* Read [Connecting Applications with Services](/docs/concepts/services-networking/connect-applications-service/) | ||
{{% /capture %}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters