Upstream across Kubernetes DC and consul VMs DC


I have a setup with 4 DCs , 3 of which are on VMs and the fourth one is on a Kubernetes, I have them connected through mesh gateways.

Within my Kubernetes datacenter I have the injector up and running , each of my deployed pods have sidecars attached and services are registered to the catalog, I also enabled the syncCatalog flag in the Helm values.

But I noticed that this injector didn’t register a “service-resolver” and therefore are not reachable by default when I map an upstream from my other DCs.

I also noticed that there is no option within the Helm chart to enforce the writing of “service-resolver” configs.

I managed to reach those services from my VM DCs by adding the following :

kind           = "service-resolver"
name           = "apache"

redirect {
  service    = "apache"
  datacenter = "dc4"

But its not really convenient to have to add those manually.

Is there an easy way to automate this? Is there a flag somewhere in the documentation that I missed ?


Hi Marius,
There is no flag to automatically add a service-resolver. When you reference the service in your upstreams you can add :[datacenter]

"": "apache:8080:dc4"

Or you can wait for our upcoming release where we will support a service-resolver custom Kubernetes resource to make it easier to create the service-resolver config.

Hi @Ikysow

Thanks for your quick reply.

I’m rather talking about how to reach them from other DCs (which are not in K8s) , is there any other way than having to manually create a resolver for each service running in my Kubernetes cluster ?


In your upstream config for the VM services you can set datacenter:

  "destination_type": "service",
  "destination_name": "apache",
  "datacenter": "dc4",
  "local_bind_address": "",
  "local_bind_port": 8080,
  "mesh_gateway": {
    "mode": "local"

Is that what you’re looking for?


It does answer my question , thanks alot.