Tasks

Edit This Page

Enabling EndpointSlices

This page provides an overview of enabling EndpointSlices in Kubernetes.

Before you begin

You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. If you do not already have a cluster, you can create one by using Minikube, or you can use one of these Kubernetes playgrounds:

To check the version, enter kubectl version.

Introduction

EndpointSlices provide a scalable and extensible alternative to Endpoints in 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 network endpoints, they will be split into multiple smaller EndpointSlice resources instead of a single large Endpoints resource.

Enabling EndpointSlices

FEATURE STATE: Kubernetes v1.17 beta
This feature is currently in a beta state, meaning:

  • The version names contain beta (e.g. v2beta3).
  • Code is well tested. Enabling the feature is considered safe. Enabled by default.
  • Support for the overall feature will not be dropped, though details may change.
  • The schema and/or semantics of objects may change in incompatible ways in a subsequent beta or stable release. When this happens, we will provide instructions for migrating to the next version. This may require deleting, editing, and re-creating API objects. The editing process may require some thought. This may require downtime for applications that rely on the feature.
  • Recommended for only non-business-critical uses because of potential for incompatible changes in subsequent releases. If you have multiple clusters that can be upgraded independently, you may be able to relax this restriction.
  • Please do try our beta features and give feedback on them! After they exit beta, it may not be practical for us to make more changes.
Note: Although EndpointSlices may eventually replace Endpoints, many Kubernetes components still rely on Endpoints. For now, enabling EndpointSlices should be seen as an addition to Endpoints in a cluster, not a replacement for them.

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.

The EndpointSlice controller creates and manages EndpointSlices in a cluster. You can enable it with the EndpointSlice feature gate on the kube-apiserverControl plane component that serves the Kubernetes API. and kube-controller-managerControl Plane component that runs controller processes. (--feature-gates=EndpointSlice=true).

For better scalability, you can also enable this feature gate on kube-proxykube-proxy is a network proxy that runs on each node in the cluster. 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 EndpointSlice resources for each Endpoints resource. In addition to supporting existing Endpoints functionality, EndpointSlices should include new bits of information such as topology. They will allow for greater scalability and extensibility of network endpoints in your cluster.

What's next

Feedback