Running CLI commands Kubernetes environment

Hello,
I’ve installed Consul on Kubernetes environment.

$ k get all -n consul
NAME                         READY   STATUS    RESTARTS   AGE
pod/consul-consul-4pcj4      1/1     Running   0          12h
pod/consul-consul-l6dfx      1/1     Running   0          12h
pod/consul-consul-server-0   1/1     Running   0          12h
pod/consul-consul-server-1   1/1     Running   0          12h

NAME                           TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                                                                   AGE
service/consul-consul-dns      ClusterIP   10.100.247.101   <none>        53/TCP,53/UDP                                                             12h
service/consul-consul-server   ClusterIP   None             <none>        8500/TCP,8301/TCP,8301/UDP,8302/TCP,8302/UDP,8300/TCP,8600/TCP,8600/UDP   12h
service/consul-consul-ui       ClusterIP   10.100.69.242    <none>        80/TCP                                                                    12h

NAME                           DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/consul-consul   2         2         2       2            2           <none>          12h

NAME                                    READY   AGE
statefulset.apps/consul-consul-server   2/2     12h

Where/how/which interface can I use cli commands in this environment? Is there any Consul client cli or something like that to connect/administrate Consul?

Thanks&Regards

consul server, agent, cli are all the same executable. It acts differently based on the parameters you pass to it. So inside of your 2 servers and 2 data nodes you have the consul cli already (it’s the same one that is running the service).

Any of them will accept a cli connection and respond. The only distinction you have make is when registering a service – I imagine there is an automated service registery with kubernetes that you have to configure.

Hello Aram,
Please take a look here

Hi @tirelibirefe,

I replied to your GitHub issue with more information on how you can run Consul CLI commands when the servers are on Kubernetes. See https://github.com/hashicorp/consul-k8s/issues/1179#issuecomment-1105639302 for more details.

You’re welcome to continue to discussion here, or on that issue. Whichever you prefer.