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
92 changes: 92 additions & 0 deletions modules/otel-collector-components.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,98 @@ The Jaeger receiver ingests traces in the Jaeger formats.
<4> The Jaeger Thrift Binary endpoint. If omitted, the default `+0.0.0.0:6832+` is used.
<5> The server-side TLS configuration. See the OTLP receiver configuration section for more details.

[id="k8sobjectsreceiver-receiver_{context}"]
=== Kubernetes Objects Receiver

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

The Kubernetes Objects Receiver pulls or watches objects to be collected from the Kubernetes API server.
This receiver watches primarily Kubernetes events, but it can collect any type of Kubernetes objects.
This receiver gathers telemetry for the cluster as a whole, so only one instance of this receiver suffices for collecting all the data.

.OpenTelemetry Collector custom resource with an enabled Kubernetes Objects Receiver
[source,yaml]
----
apiVersion: v1
kind: ServiceAccount
metadata:
name: otel-k8sobj
namespace: <namespace>
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: otel-k8sobj
namespace: <namespace>
rules:
- apiGroups:
- ""
resources:
- events
- pods
verbs:
- get
- list
- watch
- apiGroups:
- "events.k8s.io"
resources:
- events
verbs:
- watch
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: otel-k8sobj
subjects:
- kind: ServiceAccount
name: otel-k8sobj
namespace: <namespace>
roleRef:
kind: ClusterRole
name: otel-k8sobj
apiGroup: rbac.authorization.k8s.io
---
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
name: otel-k8s-obj
namespace: <namespace>
spec:
serviceAccount: otel-k8sobj
image: ghcr.io/os-observability/redhat-opentelemetry-collector/redhat-opentelemetry-collector:main
mode: deployment
config: |
receivers:
k8sobjects:
auth_type: serviceAccount
objects:
- name: pods # <1>
mode: pull # <2>
interval: 30s # <3>
label_selector: # <4>
field_selector: # <5>
namespaces: [<namespace>,...] # <6>
- name: events
mode: watch
exporters:
debug:
service:
pipelines:
logs:
receivers: [k8sobjects]
exporters: [debug]
----
<1> The Resource name that this receiver observes: for example, `pods`, `deployments`, or `events`.
<2> The observation mode that this receiver uses: `pull` or `watch`.
<3> Only applicable to the pull mode. The request interval for pulling an object. If omitted, the default value is `+1h+`.
<4> The label selector to define targets.
<5> The field selector to filter targets.
<6> The list of namespaces to collect events from. If omitted, the default value is `+all+`.

[id="prometheus-receiver_{context}"]
=== Prometheus Receiver

Expand Down