You are viewing documentation for Kubernetes version: v1.20

Kubernetes v1.20 documentation is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date documentation, see the latest version.

Enabling Service Topology

This page provides an overview of enabling Service Topology 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.


Service Topology enables a service to route traffic based upon the Node topology of the cluster. For example, a service can specify that traffic be preferentially routed to endpoints that are on the same Node as the client, or in the same availability zone.


The following prerequisites are needed in order to enable topology aware service routing:

Enable Service Topology

FEATURE STATE: Kubernetes v1.17 [alpha]

To enable service topology, enable the ServiceTopology and EndpointSlice feature gate for all Kubernetes components:


What's next

Last modified May 30, 2020 at 3:10 PM PST: add en pages (ecc27bbbe7)