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
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
- The version names contain alpha (e.g. v1alpha1).
- Might be buggy. Enabling the feature may expose bugs. Disabled by default.
- Support for feature may be dropped at any time without notice.
- The API may change in incompatible ways in a later software release without notice.
- Recommended for use only in short-lived testing clusters, due to increased risk of bugs and lack of long-term support.
To enable service topology, enable the
EndpointSlice feature gate for all Kubernetes components:
- Read about the Service Topology concept
- Read about Endpoint Slices
- Read Connecting Applications with Services
Was this page helpful?
Thanks for the feedback. If you have a specific, answerable question about how to use Kubernetes, ask it on Stack Overflow. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.