Consul Cluster Hosted on VM Want to Use Connect with Agents Inside of K8


I have been trying to find examples of a scenario like this but my google skills are failing me. We have a consul cluster that is sitting outside of Kubernetes. There are some requirements that we need to introduce connect as there is interest in the service mesh capabilities.

The initial thought was. Use the annotations that the consul has and inject the side-car that way. However, I think that assumes the server is within the cluster and that’s how everything integrates so nicely. I’m not entirely sure of that though.

Now I’m thinking I should just deploy envoy and pod together outside of any k8/consul integrations and configure them using config maps of some sort. Then I’m sure there is some sidecar proxy health checking stuff. I’m not entirely sure what the best way is to approach this is. Sounds like we might need to run a cluster inside of k8 and federated it… maybe.


Hi, there is support for running Consul inside a kube cluster with the servers running outside it. This is very similar to how folks use the HashiCorp Cloud Platform which hosts the servers for you (Connect an Elastic Kubernetes Service Cluster to HashiCorp Cloud Platform Consul | Consul - HashiCorp Learn).

These docs also address this: Consul Servers Outside of Kubernetes - Kubernetes | Consul by HashiCorp.

Note that it’s important that your network meets the requirements listed in that doc.