Edit This Page

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.

Introduction

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.

Prerequisites

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:

--feature-gates="ServiceTopology=true,EndpointSlice=true"

What's next