New Relic Inc.

05/25/2022 | News release | Distributed by Public on 05/25/2022 11:09

Correlate OpenTelemetry traces, metrics, and logs with Kubernetes performance data

5. Configure the Kubernetes Attributes processor (RBAC)

Next, you need to add configurations for role-based access control (RBAC). The processor needs , , and permissions for and resources included in the configured filters. See this example of how to configure role-based access control (RBAC) for to give a the necessary permissions for all pods and namespaces in the cluster.

6. Configure the Kubernetes Attributes processor (discovery filter)

When running the collector as an agent, you should apply a discovery filter so that the processor only discovers pods from the host that it's running on. If you don't use a filter, resource usage can be unnecessarily high, especially on very large clusters. Once the filter is applied, each processor will only query the Kubernetes API for pods running on its own node.

To set the filter, use the downward API to inject the node name as an environment variable in the Pod Env section of the OpenTelemetry collector agent configuration YAML file. See this repository for an example. The environment variable will be set to the name of the node where the pod is scheduled to run.