You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/otel-collector-components.adoc
+51Lines changed: 51 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -259,6 +259,57 @@ spec:
259
259
<5> The field selector to filter targets.
260
260
<6> The list of namespaces to collect events from. If omitted, the default value is `+all+`.
261
261
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.
0 commit comments