K8sevents Receiver
contrib, k8s
Maintainers: @dmitryax, @TylerHelmuth, @ChrsMark
Source: opentelemetry-collector-contrib
Supported Telemetry
Overview
Currently this receiver supports authentication via service accounts only. See example for more information.Configuration
The following settings are optional:auth_type(default =serviceAccount): Determines how to authenticate to the K8s API server. This can be one ofnone(for no auth),serviceAccount(to use the standard service account token provided to the agent pod), orkubeConfigto use credentials from~/.kube/config.namespaces(default =all): An array ofnamespacesto collect events from. This receiver will continuously watch all thenamespacesmentioned in the array for new events.kube_api_qps(default =5): Maximum number of queries per second to the Kubernetes API. Increase this if you seeclient-side throttlingwarnings in the collector logs.kube_api_burst(default =10): Maximum burst size for requests to the Kubernetes API. Increase this alongsidekube_api_qpsif you seeclient-side throttlingwarnings.k8s_leader_elector(default: none): if specified, will enable Leader Election by usingk8sleaderelectorextension
Example
Here is an example deployment of the collector that sets up this receiver along with the OTLP Exporter. Follow the below sections to setup various Kubernetes resources required for the deployment.Configuration
Create a ConfigMap with the config forotelcontribcol. Replace OTLP_ENDPOINT
with valid value.
Service Account
Create a service account that the collector should use.RBAC
Use the below commands to create aClusterRole with required permissions and a
ClusterRoleBinding to grant the role to the service account created above.
Deployment
Create a Deployment to deploy the collector.Conversion Example
The following K8s EventConfiguration
Example Configuration
Last generated: 2026-04-13