I would like to get a CLI-equivalent listing of ui/dc1/services/consul/instances, but I am getting tripped up by consul login:
(Im not even sure if a login is require to retrieve this status?)
-bearer-token-file=<string> Path to a file containing a secret bearer token to use with this auth method.
but it seems like the word “token” is overloaded in this case? I mean, Im already supplying an auth token as an ENV (arent I?), which I assumed was a bearer token (in a different format), so … what is it looking for?
Hi @sbirl - consul login is used to provision ACL tokens whenever you’d need one. In this case you already have one so you can just proceed without that step.
To answer your question about the bearer-token this is a JWT token associated with your identity such as the JWT token for a Kubernetes ServiceAccount as an example.
The -token-sink-file would be your output file which would contain the ACL token produced by a successful consul login.
You can probably get most of the information you’re looking for from the /v1/health/service/:service endpoint.
Unfortunately there isn’t a single CLI command that displays this information in the same way the UI does, but you may find some of the info via the CLI with consul catalog services.