elastic / support-diagnostics

Support diagnostics utility for elasticsearch and logstash
Other
289 stars 154 forks source link

[enhancement] Include in the documentation an example to run the tool on kubernetes #498

Open eedugon opened 3 years ago

eedugon commented 3 years ago

Running the diagnostic tool (--type api) when elasticsearch is running on Kubernetes is quite straight forward following this trick:

# Use kubectl port-forward to connect directly to the remote elasticsearch service (or pod)
kubectl port-forward service/elastic-k8s-es-http 9200:9200

# Then you can run the tool towards localhost (or 127.0.0.1) with --type api
./diagnostics.sh --type api -u your_username -p -s --noVerify -h localhost

Of course the ports used in the previous example could be adapted.

As a lot of users end up needing this now that Kubernetes is widely used, it might be interesting to add this way in a section of the doc. Of course if a local execution is needed then this workaround is not valid and the tool should be either included in the docker image, or run directly from the kubernetes worker (normal users won't do that in kubernetes clusters), or downloaded directly from the running container / pod. But in general I have never felt this need.

pickypg commented 3 years ago

Would you like to add it to the README @eedugon? :)

eedugon commented 3 years ago

Hehehe I will raise a PR then!! :)

El El jue, 27 may 2021 a las 17:10, Chris Earle @.***> escribió:

Would you like to add it to the README @eedugon https://github.com/eedugon? :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/elastic/support-diagnostics/issues/498#issuecomment-849715262, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBFXJK5AEWX7ZRR2WS7DATTPZOGZANCNFSM45GGOJFA .

MonGMZ commented 2 years ago

About running on local in a docker container won't work either as the tool checks if its running in pod and stop