You are viewing documentation for Kubernetes version: v1.22

Kubernetes v1.22 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 Topology Aware Hints

FEATURE STATE: Kubernetes v1.21 [alpha]

Topology Aware Hints enable topology aware routing with topology hints included in EndpointSlices. This approach tries to keep traffic close to where it originated from; you might do this to reduce costs, or to improve network performance.

Before you begin

You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:

Your Kubernetes server must be at or later than version 1.21. To check the version, enter kubectl version.

The following prerequisite is needed in order to enable topology aware hints:

  • Configure the kube-proxy to run in iptables mode or IPVS mode
  • Ensure that you have not disabled EndpointSlices

Enable Topology Aware Hints

To enable service topology hints, enable the TopologyAwareHints feature gate for the kube-apiserver, kube-controller-manager, and kube-proxy:

--feature-gates="TopologyAwareHints=true"

What's next

Last modified April 14, 2021 at 7:39 PM PST : Fix some errors (c76c3784aa)