> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bronto.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Google Kubernetes Engine logs to Bronto

> Collect Google Kubernetes Engine pod logs with an OpenTelemetry Collector DaemonSet, or bridge Cloud Logging through Pub/Sub, and forward everything into Bronto.

## Overview

The simplest way to send GKE pod logs to Bronto is an OpenTelemetry Collector **DaemonSet** that reads logs directly from each node. If you already export to Cloud Logging, you can instead bridge through Pub/Sub.

## Prerequisites

* A Bronto account and API key ([how to create one](/Account-Management/API-Keys))
* A GKE cluster with `kubectl` and Helm access

## Primary: OTel Collector DaemonSet

Deploy the Collector as a DaemonSet with the [OpenTelemetry Helm chart](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-collector). Its presets collect pod logs and add Kubernetes metadata:

```yaml values.yaml theme={"dark"}
mode: daemonset

presets:
  logsCollection:
    enabled: true
  kubernetesAttributes:
    enabled: true

config:
  exporters:
    otlphttp/brontologs:
      logs_endpoint: "https://ingestion.<REGION>.bronto.io/v1/logs"
      compression: gzip
      headers:
        x-bronto-api-key: <YOUR_API_KEY>
        x-bronto-collection: <CLUSTER_NAME>
  service:
    pipelines:
      logs:
        exporters: [otlphttp/brontologs]
```

```bash theme={"dark"}
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm install otel-collector open-telemetry/opentelemetry-collector -f values.yaml
```

Set `<REGION>` to `eu` or `us`. This reads pod logs from the node and bypasses Cloud Logging. For more Collector detail, see [Connect OpenTelemetry Collector to Bronto](/agent-setup/open-telemetry).

## Alternative: Cloud Logging via Pub/Sub

If you already route logs through Cloud Logging, create a Log Router sink to a Pub/Sub topic and read it with the `googlecloudpubsub` receiver:

```yaml /etc/otel/config.yaml theme={"dark"}
receivers:
  googlecloudpubsub:
    project: <YOUR_GCP_PROJECT_ID>
    subscription: projects/<YOUR_GCP_PROJECT_ID>/subscriptions/bronto-gke-logs-sub

processors:
  batch:

exporters:
  otlphttp/brontologs:
    logs_endpoint: "https://ingestion.<REGION>.bronto.io/v1/logs"
    compression: gzip
    headers:
      x-bronto-api-key: <YOUR_API_KEY>
      x-bronto-collection: <CLUSTER_NAME>

service:
  pipelines:
    logs:
      receivers: [googlecloudpubsub]
      processors: [batch]
      exporters: [otlphttp/brontologs]
```

<Note>
  Don't push Pub/Sub directly to Bronto — its message envelope isn't parseable. The Collector unwraps it.
</Note>

## What you will see in Bronto

Open [Search](https://app.bronto.io/search) and filter by your collection. Records carry each container's stdout/stderr plus Kubernetes attributes (pod, namespace, node, container, labels).

## Troubleshooting

* **No logs (DaemonSet)?** Confirm the DaemonSet runs on every node and the `kubernetesAttributes` preset's RBAC is in place.
* **No logs (Pub/Sub)?** Verify the sink is active and the Collector's service account has `roles/pubsub.subscriber`.
* For general issues, see [OTel Collector troubleshooting](https://opentelemetry.io/docs/collector/troubleshooting/).
