diff --git a/processor/k8sattributesprocessor/doc.go b/processor/k8sattributesprocessor/doc.go index a459a2c91ece..a04a0d53bc32 100644 --- a/processor/k8sattributesprocessor/doc.go +++ b/processor/k8sattributesprocessor/doc.go @@ -90,7 +90,36 @@ // // RBAC // -// TODO: mention the required RBAC rules. +// The k8sattributesprocessor needs `get`, `watch` and `list` permissions on both `pods` and `namespaces` resources, for all namespaces and pods included in the configured filters. +// Here is an example of a `ClusterRole` to give a `ServiceAccount` the necessary permissions for all pods and namespaces in the cluster (replace `` with a namespace where collector is deployed): +// +// apiVersion: v1 +// kind: ServiceAccount +// metadata: +// name: collector +// namespace: +// --- +// apiVersion: rbac.authorization.k8s.io/v1 +// kind: ClusterRole +// metadata: +// name: otel-collector +// rules: +// - apiGroups: [""] +// resources: ["pods", "namespaces"] +// verbs: ["get", "watch", "list"] +// --- +// apiVersion: rbac.authorization.k8s.io/v1 +// kind: ClusterRoleBinding +// metadata: +// name: otel-collector +// subjects: +// - kind: ServiceAccount +// name: collector +// namespace: +// roleRef: +// kind: ClusterRole +// name: otel-collector +// apiGroup: rbac.authorization.k8s.io // // Config //