CLI Reference
Complete reference for the obtrace-zero command-line tool — install, discover, instrument, status, and uninstall.
CLI Reference
The obtrace-zero CLI manages the operator lifecycle and provides cluster introspection tools.
Installation
Available binaries: linux-amd64, linux-arm64, darwin-amd64, darwin-arm64.
Commands
install
Deploy the operator to the cluster.
| Flag | Default | Description |
|---|---|---|
--api-key | $OBTRACE_API_KEY | Obtrace API key (required) |
--ingest | $OBTRACE_INGEST_URL or in-cluster service | Ingest endpoint URL |
--namespaces | all | Comma-separated list of namespaces to instrument |
--strategy | auto | Global instrumentation strategy: auto, sdk, ebpf, hybrid |
--image-tag | 0.1.0 | Docker image tag for operator and agents |
The CLI tries Helm first. If Helm is not installed or the install fails, it falls back to generating and applying Kubernetes manifests via kubectl apply.
The fallback manifest includes: Namespace, ServiceAccount, ClusterRole, ClusterRoleBinding, Deployment, Service, MutatingWebhookConfiguration, and ObtraceInstrumentation.
discover
Scan the cluster and show what would be instrumented without installing anything.
| Flag | Default | Description |
|---|---|---|
--namespace | all | Scan a specific namespace only |
--output | table | Output format: table or json |
The discover command lists all Deployments, StatefulSets, and DaemonSets, runs language detection on their container images, and shows the result.
System namespaces are always excluded: kube-system, kube-public, kube-node-lease, cert-manager, linkerd, linkerd-viz, argocd, obtrace-system, obtrace-infra.
Table output:
JSON output:
instrument
Create an ObtraceInstrumentation CRD for a specific namespace.
| Flag | Default | Description |
|---|---|---|
--namespace | — | Target namespace (required) |
--api-key | $OBTRACE_API_KEY | Obtrace API key (required) |
--strategy | auto | Instrumentation strategy |
--ingest | in-cluster service | Ingest endpoint URL |
This command creates the CRD via kubectl apply. Existing Pods in the namespace are not modified — they will be instrumented on next restart or rollout.
status
Show operator health and all instrumented Pods.
Displays two sections:
- Operator — Pods in
obtrace-systemnamespace with status - Instrumented Pods — All Pods with label
obtrace.io/instrumented=true, showing detected language, strategy, and framework
uninstall
Remove obtrace-zero from the cluster.
Runs helm uninstall obtrace-zero --namespace obtrace-system. If Helm is not available, deletes the obtrace-system namespace via kubectl.
version
Print the CLI version.
Environment variables
| Variable | Used by | Description |
|---|---|---|
OBTRACE_API_KEY | install, instrument | Default API key when --api-key flag is not provided |
OBTRACE_INGEST_URL | install, instrument | Default ingest endpoint when --ingest flag is not provided |
KUBECONFIG | all commands | Kubernetes config file path (standard kubectl behavior) |