Skip to main content
Skip to main content

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
Note

To send over application-level metrics or APM/traces, you'll need to add the corresponding language integration to your application as well.

The following guide assumes you have deployed a ClickStack OTel collector as a gateway, secured with an ingestion API key.

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 a API key secret

Create a new Kubernetes secret with the ingestion API Key from HyperDX. This will be used by the components installed below to securely ingest into your ClickStack OTel collector:

Additionally, create a config map with the location of your ClickStack OTel collector:

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.

Download the DaemonSet manifest:

k8s_daemonset.yaml

Creating the deployment configuration

To collect Kubernetes events and cluster-wide metrics, we'll need to deploy a separate OpenTelemetry collector as a deployment.

Download the deployment manifest:

k8s_deployment.yaml

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: