2019-09-09 17:21:18 +00:00
|
|
|
---
|
|
|
|
reviewers:
|
|
|
|
- bowei
|
|
|
|
- freehan
|
2020-01-14 17:29:18 +00:00
|
|
|
title: Enabling EndpointSlices
|
2019-09-09 17:21:18 +00:00
|
|
|
content_template: templates/task
|
|
|
|
---
|
|
|
|
|
|
|
|
{{% capture overview %}}
|
2020-01-14 17:29:18 +00:00
|
|
|
This page provides an overview of enabling EndpointSlices in Kubernetes.
|
2019-09-09 17:21:18 +00:00
|
|
|
{{% /capture %}}
|
|
|
|
|
|
|
|
|
|
|
|
{{% capture prerequisites %}}
|
|
|
|
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
|
|
|
{{% /capture %}}
|
|
|
|
|
|
|
|
{{% capture steps %}}
|
|
|
|
|
|
|
|
## Introduction
|
|
|
|
|
2020-01-14 17:29:18 +00:00
|
|
|
EndpointSlices provide a scalable and extensible alternative to Endpoints in
|
2019-09-09 17:21:18 +00:00
|
|
|
Kubernetes. They build on top of the base of functionality provided by Endpoints
|
|
|
|
and extend that in a scalable way. When Services have a large number (>100) of
|
2020-01-14 17:29:18 +00:00
|
|
|
network endpoints, they will be split into multiple smaller EndpointSlice
|
2019-09-09 17:21:18 +00:00
|
|
|
resources instead of a single large Endpoints resource.
|
|
|
|
|
2020-01-14 17:29:18 +00:00
|
|
|
## Enabling EndpointSlices
|
2019-10-06 11:33:09 +00:00
|
|
|
|
2019-12-10 00:11:29 +00:00
|
|
|
{{< feature-state for_k8s_version="v1.17" state="beta" >}}
|
2019-10-06 11:33:09 +00:00
|
|
|
|
|
|
|
{{< note >}}
|
2020-01-14 17:29:18 +00:00
|
|
|
Although EndpointSlices may eventually replace Endpoints, many Kubernetes
|
|
|
|
components still rely on Endpoints. For now, enabling EndpointSlices should be
|
2019-10-06 11:33:09 +00:00
|
|
|
seen as an addition to Endpoints in a cluster, not a replacement for them.
|
|
|
|
{{< /note >}}
|
|
|
|
|
2020-01-14 17:29:18 +00:00
|
|
|
EndpointSlices are considered a beta feature, but only the API is enabled by
|
|
|
|
default. Both the EndpointSlice controller and the usage of EndpointSlices by
|
|
|
|
kube-proxy are not enabled by default.
|
2019-09-09 17:21:18 +00:00
|
|
|
|
2020-01-14 17:29:18 +00:00
|
|
|
The EndpointSlice controller creates and manages EndpointSlices in a cluster.
|
|
|
|
You can enable it with the `EndpointSlice` [feature
|
|
|
|
gate](/docs/reference/command-line-tools-reference/feature-gates/) on the {{<
|
|
|
|
glossary_tooltip text="kube-apiserver" term_id="kube-apiserver" >}} and {{<
|
|
|
|
glossary_tooltip text="kube-controller-manager"
|
|
|
|
term_id="kube-controller-manager" >}} (`--feature-gates=EndpointSlice=true`).
|
2019-09-09 17:21:18 +00:00
|
|
|
|
2020-01-14 17:29:18 +00:00
|
|
|
For better scalability, you can also enable this feature gate on {{<
|
|
|
|
glossary_tooltip text="kube-proxy" term_id="kube-proxy" >}} so EndpointSlices
|
|
|
|
will be used as the data source instead of Endpoints.
|
|
|
|
|
|
|
|
## Using EndpointSlices
|
|
|
|
|
|
|
|
With EndpointSlices fully enabled in your cluster, you should see corresponding
|
2019-09-09 17:21:18 +00:00
|
|
|
EndpointSlice resources for each Endpoints resource. In addition to supporting
|
2020-01-14 17:29:18 +00:00
|
|
|
existing Endpoints functionality, EndpointSlices should include new bits of
|
2019-09-09 17:21:18 +00:00
|
|
|
information such as topology. They will allow for greater scalability and
|
2020-01-14 17:29:18 +00:00
|
|
|
extensibility of network endpoints in your cluster.
|
|
|
|
|
|
|
|
{{% capture whatsnext %}}
|
|
|
|
|
|
|
|
* Read about [EndpointSlices](/docs/concepts/services-networking/endpoint-slices/)
|
|
|
|
* Read [Connecting Applications with Services](/docs/concepts/services-networking/connect-applications-service/)
|
|
|
|
|
|
|
|
{{% /capture %}}
|