---
title: "Send OpenTelemetry from Kubernetes to your Mac"
description: "A cluster cannot reach your laptop. Send the pods to a collector in the cluster, and forward that collector to Loggerhead over a tunnel."
source: "https://getloggerhead.com/docs/send-telemetry/kubernetes/"
---

# Send OpenTelemetry from Kubernetes to your Mac

> A cluster cannot reach your laptop. Send the pods to a collector in the cluster, and forward that collector to Loggerhead over a tunnel.

A pod cannot open a connection to your Mac, and your Mac is not on the cluster network. So nothing in Kubernetes points at Loggerhead directly. One collector inside the cluster does the crossing.

## The shape

```
pods ──▶ collector in the cluster ──▶ tunnel ──▶ Loggerhead on your Mac
```

The pods send to a service name, which never changes. Only the collector knows about the tunnel.

## Step 1: point the pods at the in-cluster collector

```yaml title="deployment.yaml"
        env:
          - name: OTEL_SERVICE_NAME
            value: my-api
          - name: OTEL_EXPORTER_OTLP_ENDPOINT
            value: http://otel-collector.observability:4318
          - name: OTEL_EXPORTER_OTLP_PROTOCOL
            value: http/protobuf
          - name: OTEL_RESOURCE_ATTRIBUTES
            value: deployment.environment.name=staging
```

The environment tag decides which Loggerhead environment holds the records. A cluster is rarely your Local environment, so name it. See [Workspaces and environments](/docs/getting-started/workspaces-and-environments/).

## Step 2: forward the collector to your Mac

The branch collector in the cluster needs a route to your laptop. A mesh network such as Tailscale gives the Mac a stable address the cluster can reach.

The whole collector configuration, the route, and the check are on one page: [Kubernetes branch](/docs/collectors/kubernetes-branch/).

:::caution[This is a development tool]
Loggerhead holds its data in a DuckDB file on one Mac. Point a test cluster or a staging namespace at it, not a production cluster.
:::

## Step 3: check the records arrive

1. Open **Collectors** in Loggerhead. The branch appears with the count of records it forwarded.
2. Open **Logs** and filter by the service name you set.

## Then read it with your agent

Connect your coding agent once, and it reads the same data as the window. See [Claude Code](/docs/connect-your-ai-tool/claude-code/).
