Skip to content

feat(otel): Kubernetes backend for kurtosis otel start/stop#3158

Open
qu0b wants to merge 4 commits into
kurtosis-tech:mainfrom
qu0b:qu0b/otel-k8s-backend
Open

feat(otel): Kubernetes backend for kurtosis otel start/stop#3158
qu0b wants to merge 4 commits into
kurtosis-tech:mainfrom
qu0b:qu0b/otel-k8s-backend

Conversation

@qu0b

@qu0b qu0b commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

What

Implement the Kubernetes backend for the OTel stack (StartOtelInK8s / StopOtelInK8s) and wire it into the existing StartOtel / StopOtel dispatch.

Follows up the recently-merged OTel CLI work (#3135, #3136), which added the kurtosis otel start/stop commands and the Docker backend but left Kubernetes returning unsupported cluster type.

Why

On the Kubernetes backend, kurtosis otel start previously errored out — the OTel ClickHouse + collector stack could only be brought up on Docker. This makes the same command work on k8s clusters.

How

  • New cli/cli/helpers/otel/kubernetes_otel.go: brings up the ClickHouse store and the OTel collector as Kubernetes resources and returns their endpoints (mirroring the Docker backend's behavior), plus the teardown path.
  • shared.go: route KurtosisClusterType_Kubernetes to StartOtelInK8s / StopOtelInK8s (Podman stays unsupported).
  • Set CLICKHOUSE_DB + DEFAULT_ACCESS_MANAGEMENT on the ClickHouse container so the collector authenticates against it.

Docker and Podman paths are unchanged.

qu0b added 2 commits June 15, 2026 17:03
Mirrors docker_otel.go for k8s: deploys ClickHouse + otel-collector as
in-cluster Deployments/Services/ConfigMaps (reusing the embedded init.sql +
collector-bootstrap-config.yaml), idempotent by label, endpoints over cluster
DNS. Wires the previously-stubbed Kubernetes case in shared.go's StartOtel/StopOtel.
Pattern follows the existing kubernetes_grafloki.go CLI k8s observability stack.
…ollector->ClickHouse auth)

Without CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 the collector's export fails with
code 516 (auth) connecting as default from another pod. Mirrors docker_otel.go.
Validated e2e: enclave logs land in otel.otel_logs.
@qu0b qu0b force-pushed the qu0b/otel-k8s-backend branch from d5bb00a to 3627413 Compare June 15, 2026 18:05
…l.go

Align const block (gofmt) and add //nolint:exhaustruct to the Kubernetes API
struct literals (Container/EnvVar/ContainerPort/VolumeMount/Probe/ProbeHandler/
VolumeSource/ServicePort/Namespace), matching the existing cli/cli convention
(see commands/lsp/kurtosis_extension.go). Refactored the inline-nested literals
in ensureClickHouse/ensureCollector into named locals so each suppression
attaches to its construct.
@qu0b qu0b force-pushed the qu0b/otel-k8s-backend branch from 3627413 to 80d515c Compare June 15, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant