Using Consul Connect to connect a VM service to a backend service in K8


Looking for a little bit of guidance on my Connect scenario.

I have a consul cluster sitting outside of Kubernetes (EKS) and connect enabled. We have our agents inside of Kubernetes connected to this external cluster and I am able to successfully register and inject envoy. Things are good here.

I am now trying to introduce a VM as part of this mesh in the same DC and I can’t seem to get it to connect. I am able to successfully register the service with the sidecar and Consul see’s them. I do have network connectivity to the pod as we are using the CNI provided ( as far as I have been told). However, when I go to query localhost and let envoy do the routing nothing connects. Still feels like I’m missing something on the k8 to expose the sidecar to the outside world.

There is nothing in the VM Envoy logs that would indicate it’s having any trouble with the VM or Kubernetes. I also have nmaped scanned the pod for ports open and all I see things are closed, which leads me to believe there is a piece missing.

I’m starting to think I might be thinking about this the wrong way. Would this be a situation where we use an ingress gateway and not have the VM participate in the mesh? Or is there an extra config where I expose the envoy sidecar?

If the VM is part of Consul and you can run consul members on it and it lists all the k8s node and you can run consul members on a k8s node and it lists the VM node then you don’t need an ingress gateway.

Can you show us:

  • Consul config on the VM
  • service registration and proxy registration file on the VM
  • Consul client logs from the VM
  • Consul server logs from k8s

Thank you for the reply. I managed to get this working as it wasn’t Consul/Envoy at all. This was a security group that I need to allow port 20000 ( the public listener of Envoy) on my K8 nodes. This allowed the proxy’s to communicate with each other and the services started working properly.