Gather kubectl logs data to an external service
Alberto last edited by
When I run
kubectl logs MyPodNameHereI get back the standard-out of that pod.
My company has a central logging service for all our applications and I would like to send the
logsoutput to that service. (Via an
But I can't seem to find a way to hook into a Kubernetes API to get that working. Is there a Kubernetes API or other integration point to do this?
NOTE: I am also using Istio. I had hopped that I could use that for this, but I can only see stuff about sending "access logs" in the documnation on Istio. But it seems to me that it should be possible via Istio as well.
Anyone know a way to get this
logsdata sent to an HTTPS endpoint?
There are many products that will ship Kubernetes logs off to a central log server. The kubernetes documentation has https://kubernetes.io/docs/concepts/cluster-administration/logging/ that is a good place to start.
There are a number of existing projects that are designed to ship your local off to a central location:
And following some of the suggestions in the Kubernetes documentation I linked to earlier you could probably write your own (or reconfigure your existing host-based solutions to support your Kubernetes environment as well).