Jq command line tool

There is no jq command line tool when running a Dgraph Docker image, would you mind adding it?

@joaquin or @dmai can we easily add this without over bloating the image?

What’s the use case for having jq in the image? If you need to run some commands you can run a separate container with all the tooling you need.

The use case is that Dgraph is exposing a lot of informations using JSON and for example if I need to locate Alphas’ leader I must connect to Alpha container and perform the below command:

curl http://localhost:8080/state | grep leader

Yet this isn’t very helpful as there is a lot of information and in the output we have Alphas’ and Zeros’ leaders as well. Easy to make a mistake.

Using additional container can be hard as all those endpoints are accessible only from localhost.

Hmm… I just figured out that I can use kubectl port-forward instead of sshing directly to a node.

@lukaszlenart These endpoints are accessible outside of localhost. You can send a request to the hostname of that pod, or from the address exposed via the K8s Service.

Thank you, but we are not exposing Dgraph out of the cluster, so simple port-forward is enough