Early access is open. Free plan during early access. Start free
Logthread

Integration

Kubernetes

Pod logs with their namespace and pod, node and pod CPU and memory, restarts and deployment health.

  • Category: Containers
  • How data is sent: Logthread Agent
  • Status: Beta

How it works#

  1. Answer a few questions. They only fill in the setup steps. Nothing on this page connects to your servers: Logthread never reaches into your network.
  2. Install with Helm in your cluster. The next page shows two Helm values files and the commands, with this connector's ingest key stored as a Kubernetes secret. They install the OpenTelemetry Collector chart twice: on every node (pod logs, node metrics) and once for the cluster. Needs kubectl and helm access to the cluster.
  3. Data arrives. Everything is collected inside your environment. It is sent over outbound HTTPS (port 443) to ingest.logthread.com. Nothing is opened to the internet: no inbound ports, VPN or public access to your servers. The connection page shows what has arrived and turns Active with the first record.

What you answer#

QuestionAnswerNotes
Cluster name (optional)TextShown as k8s.cluster.name.
NamespaceTextDefault: logthread.

Setup#

These are the steps for the default answers. In the app, they follow your answers, and the connector's ingest key replaces YOUR_INGEST_KEY.

Step 1. Save the two values files. Nodes runs on every node; cluster runs once. The key stays in a Kubernetes secret, never in these files.

logthread-nodes.yaml:

# Every node: pod logs, kubelet CPU and memory, and OTLP from your workloads.
mode: daemonset
image:
  repository: otel/opentelemetry-collector-contrib
extraEnvs:
  - name: LOGTHREAD_INGEST_KEY
    valueFrom:
      secretKeyRef:
        name: logthread-ingest
        key: key
presets:
  logsCollection:
    enabled: true
    includeCollectorLogs: false
  kubernetesAttributes:
    enabled: true
  kubeletMetrics:
    enabled: true
config:
  processors:
    # service.name: the app's own, else the container name, else "kubernetes".
    transform/service:
      error_mode: ignore
      log_statements:
        - context: resource
          statements:
            - set(attributes["service.name"], attributes["k8s.container.name"]) where attributes["service.name"] == nil and attributes["k8s.container.name"] != nil
    resource/logthread:
      attributes:
        - {key: service.name, value: kubernetes, action: insert}
  exporters:
    otlphttp/logthread:
      endpoint: https://ingest.logthread.com
      headers:
        Authorization: "Bearer ${env:LOGTHREAD_INGEST_KEY}"
      compression: gzip
  service:
    pipelines:
      logs:
        processors: [memory_limiter, k8sattributes, transform/service, resource/logthread, batch]
        exporters: [otlphttp/logthread]
      traces:
        processors: [memory_limiter, k8sattributes, resource/logthread, batch]
        exporters: [otlphttp/logthread]
      metrics:
        processors: [memory_limiter, k8sattributes, resource/logthread, batch]
        exporters: [otlphttp/logthread]

Step 2. And the cluster file. Cluster-wide state from the Kubernetes API.

logthread-cluster.yaml:

# One replica: deployments, restarts and pod phases for the whole cluster.
mode: deployment
replicaCount: 1
image:
  repository: otel/opentelemetry-collector-contrib
extraEnvs:
  - name: LOGTHREAD_INGEST_KEY
    valueFrom:
      secretKeyRef:
        name: logthread-ingest
        key: key
presets:
  clusterMetrics:
    enabled: true
config:
  processors:
    resource/logthread:
      attributes:
        - {key: service.name, value: kubernetes, action: insert}
  exporters:
    otlphttp/logthread:
      endpoint: https://ingest.logthread.com
      headers:
        Authorization: "Bearer ${env:LOGTHREAD_INGEST_KEY}"
      compression: gzip
  service:
    pipelines:
      metrics:
        processors: [memory_limiter, resource/logthread, batch]
        exporters: [otlphttp/logthread]

Step 3. Install with Helm. Uses the OpenTelemetry Collector chart. Workloads can send traces and metrics to the node collector on ports 4317 and 4318.

kubectl create namespace logthread --dry-run=client -o yaml | kubectl apply -f -
kubectl create secret generic logthread-ingest --namespace logthread \
  --from-literal=key=YOUR_INGEST_KEY
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update
helm upgrade --install logthread-nodes open-telemetry/opentelemetry-collector --namespace logthread -f logthread-nodes.yaml
helm upgrade --install logthread-cluster open-telemetry/opentelemetry-collector --namespace logthread -f logthread-cluster.yaml

Check that it works#

The connection page under Integrations counts what has arrived and turns Active with the first record. In Explore, search service:kubernetes.

Then add#

Each is one click on the connection page and opens with your data, so you can check it before saving.

  • Dashboard: Kubernetes: Node and pod CPU and memory from the kubelet, container restarts and deployment availability, and logs by namespace.

Set it up under Integrations in the app, or from an AI agent with MCP (add_integration). All integrations: Integrations guide. Next: find what it sends in Explore and live tail.