Skip to content

Commit a98db75

Browse files
authored
Merge pull request #75202 from max-cx/TRACING-4067
OBSDOCS-939/TRACING-4067: Write documentation for kubeletstats rcv component
2 parents 5abcad0 + ad65c24 commit a98db75

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

modules/otel-collector-components.adoc

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,57 @@ spec:
259259
<5> The field selector to filter targets.
260260
<6> The list of namespaces to collect events from. If omitted, the default value is `+all+`.
261261

262+
[id="kubeletstats-receiver_{context}"]
263+
=== Kubelet Stats Receiver
264+
265+
:FeatureName: The Kubelet Stats Receiver
266+
include::snippets/technology-preview.adoc[]
267+
268+
The Kubelet Stats Receiver extracts metrics related to nodes, pods, containers, and volumes from the kubelet's API server. These metrics are then channeled through the metrics-processing pipeline for additional analysis.
269+
270+
.OpenTelemetry Collector custom resource with an enabled Kubelet Stats Receiver
271+
[source,yaml]
272+
----
273+
# ...
274+
config: |
275+
receivers:
276+
kubeletstats:
277+
collection_interval: 20s
278+
auth_type: "serviceAccount"
279+
endpoint: "https://${env:K8S_NODE_NAME}:10250"
280+
insecure_skip_verify: true
281+
service:
282+
pipelines:
283+
metrics:
284+
receivers: [kubeletstats]
285+
env:
286+
- name: K8S_NODE_NAME # <1>
287+
valueFrom:
288+
fieldRef:
289+
fieldPath: spec.nodeName
290+
# ...
291+
----
292+
<1> Sets the `K8S_NODE_NAME` to authenticate to the API.
293+
294+
The Kubelet Stats Receiver requires additional permissions for the service account used for running the OpenTelemetry Collector.
295+
296+
.Permissions required by the service account
297+
[source,yaml]
298+
----
299+
apiVersion: rbac.authorization.k8s.io/v1
300+
kind: ClusterRole
301+
metadata:
302+
name: otel-collector
303+
rules:
304+
- apiGroups: ['']
305+
resources: ['nodes/stats']
306+
verbs: ['get', 'watch', 'list']
307+
- apiGroups: [""]
308+
resources: ["nodes/proxy"] # <1>
309+
verbs: ["get"]
310+
----
311+
<1> The permissions required when using the `extra_metadata_labels` or `request_utilization` or `limit_utilization` metrics.
312+
262313
[id="prometheus-receiver_{context}"]
263314
=== Prometheus Receiver
264315

0 commit comments

Comments
 (0)