> ## 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 and metrics to Bronto

> Collect GKE pod logs and kubelet metrics with an OpenTelemetry Collector DaemonSet, or bridge Cloud Logging through Pub/Sub, and forward both to Bronto.

## Overview

On **GKE Standard**, the recommended setup is an OpenTelemetry Collector **DaemonSet** that reads pod logs and kubelet metrics from each node. If you already export logs to Cloud Logging — or you run **GKE Autopilot**, which does not permit node-level collection — bridge those logs through Pub/Sub instead.

## Prerequisites

* A Bronto account and API key ([how to create one](https://docs.bronto.io/Account-Management/API-Keys.md))
* 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
  kubeletMetrics:
    enabled: true

config:
  exporters:
    otlp_http/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>
    otlp_http/brontometrics:
      metrics_endpoint: "https://ingestion.<REGION>.bronto.io/v1/metrics"
      compression: gzip
      headers:
        x-bronto-api-key: <YOUR_API_KEY>
  service:
    pipelines:
      logs:
        exporters: [otlp_http/brontologs]
      metrics:
        exporters: [otlp_http/brontometrics]
```

```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](https://docs.bronto.io/agent-setup/open-telemetry.md).

> [!NOTE]
>
> For volume or request/limit utilization metrics, grant the Collector service account `get` access to `nodes/proxy`.

> [!WARNING]
>
> **GKE Autopilot:** this DaemonSet path does not work. Autopilot does not support node-level log collection, and it blocks the `nodes/proxy` access the `kubeletMetrics` preset needs — enabling it leaves the DaemonSet crash-looping on privilege errors. On Autopilot, collect logs through the Pub/Sub bridge below, and get metrics and traces by exporting OTLP from each application (see [Ingest OpenTelemetry data](https://docs.bronto.io/opentelemetry/overview.md)).

For receiver settings, authentication, and available measurements, see the [Collector Contrib Kubelet Stats receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/kubeletstatsreceiver).

## Alternative: Cloud Logging via Pub/Sub

If you already route logs through Cloud Logging — or you are on Autopilot — create a Log Router sink to a Pub/Sub topic and read it with the `googlecloudpubsub` receiver. Use the inclusion filter `resource.type="k8s_container"`, create a pull subscription on the topic, and grant the Collector's service account `roles/pubsub.subscriber` (via Workload Identity). See the [Cloud Logging routing docs](https://cloud.google.com/logging/docs/export/configure_export_v2).

```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

exporters:
  otlp_http/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>
    sending_queue:
      batch: {}

service:
  pipelines:
    logs:
      receivers: [googlecloudpubsub]
      exporters: [otlp_http/brontologs]
```

> [!NOTE]
>
> Don't push Pub/Sub directly to Bronto — its message envelope isn't parseable. The Collector unwraps it.

## What you will see in Bronto

Open Search for pod logs and the Metric Explorer for kubelet metrics. Kubernetes resource attributes identify the pod, namespace, node, and container.

## Troubleshooting

* **No logs (DaemonSet)?** Confirm the DaemonSet runs on every node and the `kubernetesAttributes` preset's RBAC is in place.
* **No metrics?** Confirm the `kubeletMetrics` preset is enabled and the Collector can reach each node's kubelet.
* **DaemonSet crash-looping on GKE Autopilot?** Autopilot blocks `nodes/proxy` and node-level log collection — use the Pub/Sub bridge for logs and per-application OTLP for metrics instead.
* **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/).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.