0

I've got the EFK stack installed on kubernetes following this addon: https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch

What I want to achieve is having all the logs of the same pod together, and even maybe some other filters. But I don't want to configure the filter in kibana with the GUI, I'd like to have them preconfigured in the way that some of my known containers (the containers that I want to monitorize) are configured previously and installed when kibana rather than using an additional step to import/export them. I'd like to have the predefined filters in a way that, immediately after the installation, I can go to "discover", select the pod name that I want to see and then I see all the logs in the format:

In my understanding, that being the first time that I use this tech is near to zero, the in the fluentd-configmap.yml with the correct parameters should do the trick, but none of my tries has altered what I see in kibana.

Am I looking in the correct place for doing this or this filter is not for this use and I'm completely wasting my time? How could I do this filter in any case?

Any help, even if is only a hint, would be appreciated.

  • I'm not exactly sure if I understood you correctly, you can set [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/) in Kubernetes for your `pods`. [Here](https://kubernetes.io/docs/concepts/configuration/overview/#using-labels) is a short explenation how to use labels. – Crou Mar 12 '20 at 13:32
  • Yep, hard to explain, I'm struggling a bit with the concepts. I've got labels in the pods and, when I go to kibana, I see them correctly. I can filter the logs of my containers and pods in a similar way to this link:https://www.elastic.co/guide/en/kibana/current/field-filter.html but I want to have this automatically, in a way that I can install the EFK stack with my yamls and I can see these filters without having to configure anything after installation. – citizen d Mar 12 '20 at 13:39

0 Answers0