apiVersion: v1 kind: ServiceAccount metadata: name: otel-agent --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: otel-agent-pod-metadata rules: - apiGroups: [""] resources: [pods, namespaces] verbs: [get, list, watch] --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: otel-agent-pod-metadata roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: otel-agent-pod-metadata subjects: - kind: ServiceAccount name: otel-agent namespace: opentelemetry-agent