Recommended way to use telegraf for kubernetes


I have been running telegraf with inputs.docker within kubernetes for about 20 months. This is almost perfect. However, when having short running pods like kubernetes-cronjobs (sometimes their lifetime is only some seconds), the plugin does not get their metrics. (see Question about telegraf: docker-container-status / exitcode for details)

Actually, I am searching for the recomended way to get the “real” kubernetes-metrics.

I find the inputs.kubernetes-plugin and I am wondering how to get the token from kubernetes. Other docs like do not use the inputs.kubernetes-plugin.

I have a k8-cluster with one master and three nodes (workers).

Looking forward to your tips. Thanks.

Ok, just found with and got it running.

However, there are very little metrics compared with inputs.docker.

What is the recommended way to get metrics from kubernetes without running docker - e.g. with ?

1 Like