website/content/en/docs/tasks/administer-cluster/enabling-service-topology.md

1.9 KiB

reviewers title content_type min-kubernetes-server-version
andrewsykim
johnbelamaric
imroc
Enabling Service Topology task 1.17

{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}

This feature, specifically the alpha topologyKeys field, is deprecated since Kubernetes v1.21. Topology Aware Hints, introduced in Kubernetes v1.21, provide similar functionality.

Service Topology enables a {{< glossary_tooltip term_id="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.

{{% heading "prerequisites" %}}

{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}

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

  • Kubernetes v1.17 or later
  • Configure {{< glossary_tooltip text="kube-proxy" term_id="kube-proxy" >}} to run in iptables mode or IPVS mode

Enable Service Topology

{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}

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

--feature-gates="ServiceTopology=true`

{{% heading "whatsnext" %}}