diff --git a/extension/observer/k8sobserver/README.md b/extension/observer/k8sobserver/README.md index 29c4e8c9af34..93683eef2a64 100644 --- a/extension/observer/k8sobserver/README.md +++ b/extension/observer/k8sobserver/README.md @@ -75,4 +75,169 @@ All fields are optional. | observe_ingresses | bool | `false` | Whether to report observer k8s.ingress endpoints.| More complete configuration examples on how to use this observer along with the `receiver_creator`, -can be found at the [Receiver Creator](../../../receiver/receivercreator/README.md)'s documentation. \ No newline at end of file +can be found at the [Receiver Creator](../../../receiver/receivercreator/README.md)'s documentation. + +### Setting up RBAC permissions + +When using the `serviceAccount` `auth_type`, the service account of the pod running the agent needs to have the required permissions to +read the K8s resources it should observe (i.e. pods, nodes, services and ingresses). +Therefore, the service account running the pod needs to have the required `ClusterRole` which grants it the permission to +read those resources from the Kubernetes API. Below is an example of how to set this up: + +1. Create a `ServiceAccount` that the collector should use. + +```bash +< + + service: + pipelines: + metrics: + receivers: [receiver_creator] + exporters: [otlp] +EOF +``` + +4. Create the collector deployment, referring to the service account created earlier + +```bash +<