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:
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:
- Kubernetes 1.17 or later
- Kube-proxykube-proxy is a network proxy that runs on each node in the cluster. running in iptables mode or IPVS mode
- Enable Endpoint Slices
Enable Service Topology
Kubernetes v1.17 [alpha]
To enable service topology, enable the
EndpointSlice feature gate for all Kubernetes components: