So id like to present the following issue i have been facing in the last few days.
We are trying to run consul in a namespace encapsulation kind of way.
In essence each of our namespace would be an environment with a client/server running in it. We mostly want to d this for the key/value functionality.
Now the problem I am facing is that everything runs ok if we deploy consul to 1 namespace but when we deploy to another namespace it gives out an error saying that the “port 8500 is already in use” which ofc it would because the clients run as a daemonSet and it is using a hostPorts which ofc cannot be used again.
Now the question is, can this even be achieved (namespace encapsulation for consul)? Or is consul only designed to be ran as a cluster wide service?
Consul is designed to be run as a cluster-wide service.
You could use client.nodeSelector in the Helm chart to control which nodes the Consul client is placed on, and potentially run a different Consul installation that uses a separate set of nodes. However, this configuration is not tested by HashiCorp.
We recommend using a separate cluster if you want to run a separate Consul instance, or using the Admin Partitions feature that is available in Consul Enterprise.
Thank you very much for your response, i suspected that this might be the case but i wanted to confirm.