Kubernetes
ClickStack uses the OpenTelemetry (OTel) collector to collect logs, metrics, and Kubernetes events from Kubernetes clusters and forward them to ClickStack. We support the native OTel log format and require no additional vendor-specific configuration.
This guide integrates the following:
- Logs
- Infra Metrics
To send over application-level metrics or APM/traces, you'll need to add the corresponding language integration to your application as well.
Creating the OTel Helm Chart configuration files
To collect logs and metrics from both each node and the cluster itself, we'll need to deploy two separate OpenTelemetry collectors. One will be deployed as a DaemonSet to collect logs and metrics from each node, and the other will be deployed as a deployment to collect logs and metrics from the cluster itself.
Creating the DaemonSet configuration
The DaemonSet will collect logs and metrics from each node in the cluster but will not collect Kubernetes events or cluster-wide metrics.
Create a file called daemonset.yaml
with the following contents:
Creating the Deployment Configuration
To collect Kubernetes events and cluster-wide metrics, we'll need to deploy a separate OpenTelemetry collector as a deployment.
Create a file called deployment.yaml
with the following contents:
Deploying the OpenTelemetry collector
The OpenTelemetry collector can now be deployed in your Kubernetes cluster using the OpenTelemetry Helm Chart.
Add the OpenTelemetry Helm repo:
Install the chart with the above config:
Now the metrics, logs and Kubernetes events from your Kubernetes cluster should now appear inside HyperDX.
Forwarding resource tags to pods (Recommended)
To correlate application-level logs, metrics, and traces with Kubernetes metadata
(ex. pod name, namespace, etc.), you'll want to forward the Kubernetes metadata
to your application using the OTEL_RESOURCE_ATTRIBUTES
environment variable.
Here's an example deployment that forwards the Kubernetes metadata to the application using environment variables: