I have installed and configured Consul cluster on VM nodes. I would like to add there another nodes in client mode, not in SERVER mode. These nodes should run on Kubernetes. I have used HELM template but I'm not able to add there these nodes in CLIENT mode but only in server node. HELM TEMPLATE: https://github.com/helm/charts/tree/master/stable/consul
I want to use this for service registration to Consul cluster. Does anyone has any idea or experience with this?
The official Consul helm chart (https://github.com/hashicorp/consul-helm/) supports this. You'll want to deploy the Helm chart using a configuration similar to the following.
# By default disable all resources in the Helm chart
global:
enabled: false
# Enable Client nodes
client:
enabled: true
# Set this to true to expose the Consul clients using the Kubernetes node
# IPs. If false, the pod IPs must be routable from the external servers.
exposeGossipPorts: true
# IPs of your external Consul server(s)
join:
- 192.0.2.10
- 192.0.2.20
- 192.0.2.30
See the Consul Servers Outside of Kubernetes docs for details.