Send OpenTelemetry from Kubernetes to your Mac
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
Section titled “The shape”pods ──▶ collector in the cluster ──▶ tunnel ──▶ Loggerhead on your MacThe 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
Section titled “Step 1: point the pods at the in-cluster collector” 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=stagingThe environment tag decides which Loggerhead environment holds the records. A cluster is rarely your Local environment, so name it. See Workspaces and environments.
Step 2: forward the collector to your Mac
Section titled “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.
Step 3: check the records arrive
Section titled “Step 3: check the records arrive”- Open Collectors in Loggerhead. The branch appears with the count of records it forwarded.
- Open Logs and filter by the service name you set.
Then read it with your agent
Section titled “Then read it with your agent”Connect your coding agent once, and it reads the same data as the window. See Claude Code.