Skip to main content
This guide walks you through collecting logs, infrastructure metrics, and Kubernetes events from a cluster into Managed ClickStack, then viewing them in the built-in Kubernetes dashboard. The pattern is the standard OpenTelemetry one: two collectors deployed via the OpenTelemetry Helm chart, each forwarding to your ClickStack gateway collector via OTLP. A DaemonSet runs on every node to collect container logs and kubelet metrics. A Deployment with a single replica collects Kubernetes events and cluster-wide metrics. For background on the gateway role, see Collector roles. This guide assumes you’ve completed Setting up your OpenTelemetry Collector and have a ClickStack gateway collector running. For a Kubernetes-resident workload, the gateway collector itself should be deployed inside the same cluster using the upstream OpenTelemetry Helm chart with the ClickStack collector image. Follow the Helm path in Deploying the collector to install it. Ensure you have recorded this OTLP endpoint.
1

Gather your prerequisites

You’ll need:
  • A Kubernetes cluster (v1.20+ recommended) with kubectl configured against it.
  • Helm v3+.
  • The OTLP endpoint of your ClickStack gateway collector, reachable from inside the cluster, for example http://clickstack-otel-collector.observability.svc.cluster.local:4318. The collector should be deployed somewhere your DaemonSets and Deployment can reach it, typically in the same cluster or via a service of type LoadBalancer.
  • The OTLP_AUTH_TOKEN value you set when deploying the gateway collector. If you didn’t secure the collector, you can skip the secret step below and drop the authorization header from the manifests.
Where the gateway runsFor a cluster-local deployment, run the gateway collector as a Kubernetes Deployment or StatefulSet inside the same cluster and address it through its in-cluster service DNS. For a gateway running outside the cluster, use its externally reachable URL.
2

Create the auth secret and ConfigMap

Pick the namespace you want the collectors to live in, then create a secret holding the OTLP_AUTH_TOKEN and a ConfigMap pointing at your gateway:
Both collectors below read these values via extraEnvs, so the same secret and ConfigMap are reused across them.
3

Add the OpenTelemetry Helm repo

4

Deploy the cluster collector

This is a single-replica Deployment that collects Kubernetes events and cluster-wide metrics (node counts, pod phases, deployment status, and so on). Running more than one replica would produce duplicates.Save the following as k8s_deployment.yaml:
Install it:
5

Deploy the node collector

This is a DaemonSet that runs on every node to collect container logs, host metrics, and kubelet metrics (per-pod and per-container CPU and memory utilisation against requests and limits).Save the following as k8s_daemonset.yaml:
Install it:
Confirm both releases are healthy:
You should see one Deployment pod and one DaemonSet pod per node, all in Running state.
6

Forward Kubernetes attributes to your apps (recommended)

To correlate your application logs, metrics, and traces with Kubernetes metadata (pod name, namespace, node, deployment), forward the metadata into your application via OTEL_RESOURCE_ATTRIBUTES. The DaemonSet’s k8sattributes processor will then enrich incoming telemetry with the matching pod and node attributes.
7

Confirm in the ClickStack UI

Open your service in the ClickHouse Cloud console and select ClickStack from the left menu.In the Search view, switch the source to Logs and set the time range to Last 15 minutes. Container logs from across the cluster should appear within a few seconds, enriched with attributes like k8s.namespace.name, k8s.pod.name, and k8s.node.name.To see infrastructure metrics and events in context, open the built-in Kubernetes dashboard by navigating to Dashboards -> Kubernetes. The Pods, Nodes, and Namespaces tabs should all be populated.If nothing shows up:
  • Verify the DaemonSet and Deployment pods are Running and tail their logs with kubectl logs -n ${NAMESPACE} <pod>.
  • Confirm YOUR_OTEL_COLLECTOR_ENDPOINT is reachable from inside the cluster (kubectl exec into one of the collector pods and curl it).
  • Check that the OTLP_AUTH_TOKEN in the secret matches the value set on the gateway collector.
8

Further reading