After your EdgeConnect is online, you can verify how the Dynatrace runtime routes traffic to it and rewrite request hosts when multiple configurations need to reach services on the same internal hostname.
If you haven't deployed your first EdgeConnect yet, start at Get started with EdgeConnect.
To test which EdgeConnect configuration handles a URL in your environment:
For background on host patterns and how the runtime selects the most specific match, see Host patterns.
Host mappings rewrite the host of matching requests to a different target hostname before EdgeConnect forwards them. Use them when multiple EdgeConnect configurations need to reach internal services that share the same hostname (for example, services on localhost or the Kubernetes API across multiple clusters).
To configure host mappings:
When several services listen on localhost, give each one a unique host pattern and map it back to localhost. Each request then routes to the correct configuration but reaches the container as a standard localhost call.
For example:
service-a defines the host pattern localhost-service-a and maps it to localhost.
http://localhost-service-a/myservice is routed to configuration service-a. Before the request reaches the EdgeConnect container, EdgeConnect rewrites the target to http://localhost/myservice.service-b independently defines the host pattern localhost-service-b and maps it to localhost.
http://localhost-service-b/otherservice routes to service-b (a separate EdgeConnect deployment) and reaches it as http://localhost/otherservice.Every cluster exposes its Kubernetes API at the same internal address, kubernetes.default.svc.cluster.local. Give each cluster a unique host pattern and map it back to that shared address, so requests reach the right cluster while the container receives a standard in-cluster call.
For example:
k8-api-dev defines the host pattern kubernetes-api-dev-cluster and maps it to kubernetes.default.svc.cluster.local.https://kubernetes-api-dev-cluster/api/v1/pods is routed to the EdgeConnect deployment in the dev cluster and rewritten to https://kubernetes.default.svc.cluster.local/api/v1/pods.k8-api-production defines the host pattern kubernetes-api-production-cluster, with the same target host mapping, deployed in the production cluster.https://kubernetes-api-dev-cluster/api/v1/pods and https://kubernetes-api-production-cluster/api/v1/pods are routed to their respective clusters.These distinct patterns let you manage each cluster independently.
For a detailed walkthrough of this pattern, see Set up EdgeConnect for the Kubernetes Connector manually.
edgeConnect.yaml parameters and environment variables, see EdgeConnect reference.