Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 137 additions & 0 deletions modules/otel-collector-components.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,143 @@ The Kafka receiver receives traces, metrics, and logs from Kafka in the OTLP for
<6> Disables verifying the server's certificate chain and host name. The default is `+false+`.
<7> ServerName indicates the name of the server requested by the client to support virtual hosting.

[id="k8scluster-receiver_{context}"]
=== Kubernetes Cluster Receiver

:FeatureName: The Kubernetes Cluster Receiver
include::snippets/technology-preview.adoc[]

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.

.OpenTelemetry Collector custom resource with the enabled Kubernetes Cluster Receiver
[source,yaml]
----
# ...
receivers:
k8s_cluster:
distribution: openshift
collection_interval: 10s
exporters:
debug:
service:
pipelines:
metrics:
receivers: [k8s_cluster]
exporters: [debug]
logs/entity_events:
receivers: [k8s_cluster]
exporters: [debug]
# ...
----

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.

.`ServiceAccount` object
[source,yaml]
----
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: otelcontribcol
name: otelcontribcol
----

.RBAC rules for the `ClusterRole` object
[source,yaml]
----
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: otelcontribcol
labels:
app: otelcontribcol
rules:
- apiGroups:
- quota.openshift.io
resources:
- clusterresourcequotas
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- events
- namespaces
- namespaces/status
- nodes
- nodes/spec
- pods
- pods/status
- replicationcontrollers
- replicationcontrollers/status
- resourcequotas
- services
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- daemonsets
- deployments
- replicasets
- statefulsets
verbs:
- get
- list
- watch
- apiGroups:
- extensions
resources:
- daemonsets
- deployments
- replicasets
verbs:
- get
- list
- watch
- apiGroups:
- batch
resources:
- jobs
- cronjobs
verbs:
- get
- list
- watch
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- get
- list
- watch
----

.`ClusterRoleBinding` object
[source,yaml]
----
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: otelcontribcol
labels:
app: otelcontribcol
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: otelcontribcol
subjects:
- kind: ServiceAccount
name: otelcontribcol
namespace: default
----

[id="opencensus-receiver_{context}"]
=== OpenCensus receiver

Expand Down