Skip to content

Commit 9b93986

Browse files
authored
Merge pull request #75604 from max-cx/OBSDOCS-1035
OBSDOCS-1035/TRACING-4077: Write documentation for the k8scluterreceiver component
2 parents dcda2ef + 3c4a89b commit 9b93986

File tree

1 file changed

+137
-0
lines changed

1 file changed

+137
-0
lines changed

modules/otel-collector-components.adoc

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,143 @@ The Kafka receiver receives traces, metrics, and logs from Kafka in the OTLP for
172172
<6> Disables verifying the server's certificate chain and host name. The default is `+false+`.
173173
<7> ServerName indicates the name of the server requested by the client to support virtual hosting.
174174

175+
[id="k8scluster-receiver_{context}"]
176+
=== Kubernetes Cluster Receiver
177+
178+
:FeatureName: The Kubernetes Cluster Receiver
179+
include::snippets/technology-preview.adoc[]
180+
181+
The Kubernetes Cluster Receiver gathers cluster metrics and entity events from the Kubernetes API server. It uses the Kubernetes API to receive information about updates. Authentication for this receiver is only supported through service accounts.
182+
183+
.OpenTelemetry Collector custom resource with the enabled Kubernetes Cluster Receiver
184+
[source,yaml]
185+
----
186+
# ...
187+
receivers:
188+
k8s_cluster:
189+
distribution: openshift
190+
collection_interval: 10s
191+
exporters:
192+
debug:
193+
service:
194+
pipelines:
195+
metrics:
196+
receivers: [k8s_cluster]
197+
exporters: [debug]
198+
logs/entity_events:
199+
receivers: [k8s_cluster]
200+
exporters: [debug]
201+
# ...
202+
----
203+
204+
This receiver requires a configured service account, RBAC rules for the cluster role, and the cluster role binding that binds the RBAC with the service account.
205+
206+
.`ServiceAccount` object
207+
[source,yaml]
208+
----
209+
apiVersion: v1
210+
kind: ServiceAccount
211+
metadata:
212+
labels:
213+
app: otelcontribcol
214+
name: otelcontribcol
215+
----
216+
217+
.RBAC rules for the `ClusterRole` object
218+
[source,yaml]
219+
----
220+
apiVersion: rbac.authorization.k8s.io/v1
221+
kind: ClusterRole
222+
metadata:
223+
name: otelcontribcol
224+
labels:
225+
app: otelcontribcol
226+
rules:
227+
- apiGroups:
228+
- quota.openshift.io
229+
resources:
230+
- clusterresourcequotas
231+
verbs:
232+
- get
233+
- list
234+
- watch
235+
- apiGroups:
236+
- ""
237+
resources:
238+
- events
239+
- namespaces
240+
- namespaces/status
241+
- nodes
242+
- nodes/spec
243+
- pods
244+
- pods/status
245+
- replicationcontrollers
246+
- replicationcontrollers/status
247+
- resourcequotas
248+
- services
249+
verbs:
250+
- get
251+
- list
252+
- watch
253+
- apiGroups:
254+
- apps
255+
resources:
256+
- daemonsets
257+
- deployments
258+
- replicasets
259+
- statefulsets
260+
verbs:
261+
- get
262+
- list
263+
- watch
264+
- apiGroups:
265+
- extensions
266+
resources:
267+
- daemonsets
268+
- deployments
269+
- replicasets
270+
verbs:
271+
- get
272+
- list
273+
- watch
274+
- apiGroups:
275+
- batch
276+
resources:
277+
- jobs
278+
- cronjobs
279+
verbs:
280+
- get
281+
- list
282+
- watch
283+
- apiGroups:
284+
- autoscaling
285+
resources:
286+
- horizontalpodautoscalers
287+
verbs:
288+
- get
289+
- list
290+
- watch
291+
----
292+
293+
.`ClusterRoleBinding` object
294+
[source,yaml]
295+
----
296+
apiVersion: rbac.authorization.k8s.io/v1
297+
kind: ClusterRoleBinding
298+
metadata:
299+
name: otelcontribcol
300+
labels:
301+
app: otelcontribcol
302+
roleRef:
303+
apiGroup: rbac.authorization.k8s.io
304+
kind: ClusterRole
305+
name: otelcontribcol
306+
subjects:
307+
- kind: ServiceAccount
308+
name: otelcontribcol
309+
namespace: default
310+
----
311+
175312
[id="opencensus-receiver_{context}"]
176313
=== OpenCensus receiver
177314

0 commit comments

Comments
 (0)