Out of cluster node in k8s

Does anyone have the experience of adding Out-of-Cluster Nodes to a consul cluster running on k8s ? (done using consul’s official helm chart and the diplomatic values.yaml file), the agent on the server outside the cluster can not communicate with the cosnul server on the k8s

the k8s does not expose a service for consul server (didn’t find how to change it in the values.yaml also) and i dont know if its needed but it doesn’t work

Hi @Iditgl!

I can’t recall the exact steps but I do sort of remember the rough idea, hopefully they help.

The consul-helm templates create headless services for the Consul server’s StatefulSet. You are correct that the service manifest does not expose the service. This is because it is assigning the sticky identity for internal resolution.

You can try to connect the Consul server outside of the cluster to the UI service if you have it enabled, since that seems to allow you to create an externally resolvable endpoint on the Consul servers. If you’ve tried updating the UI section of the values.yaml to type: LoadBalancer (for an external endpoint) and it still does not work, this Learn guide has a useful section on network considerations that might help figure out the connectivity.

Also see Nic’s response here: Can't connect with k8s helm-deployed Consul and "out of cluster nodes"