Skip to content
Advertisement

Options for getting logs in kubernetes pods

Have few developer logs in kubernetes pods, what is the best method to get the logs for the developers to see it.

Any specific tools that we can use?

I have the option of graylog, but not sure if that can be customized to get the developer logs into it.

Advertisement

Answer

The most basic method would be to simply use kubectl logs command:

Print the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional.

Here you can find more details regarding the command and it’s flags alongside some useful examples.

Also, you may want to use:

Both should do the trick in your case.

Please let me know if that is what you had on mind and if my answer was helpful.

Advertisement