Kubernetes Implementation Guide
By Nicolas Narbais
Collect Kubernetes node, cluster, workload, log, and inventory signals in an order that keeps ownership and validation clear.
Build Kubernetes observability in six stages: node agents, a single cluster receiver, container logs, inventory verification, dashboards, and owned monitors. Application traces alone never explain node pressure, pending pods, or eviction storms.
| Level | Goal | Signal / artifact |
|---|---|---|
| 1 | Node-level collection | DaemonSet agent: kubelet, host, local OTLP, k8s_attributes |
| 2 | Cluster-level state | Single Deployment: k8s_cluster metrics + events |
| 3 | Container logs + trace pivot | Node filelog with K8s context + trace_id/span_id |
| 4 | Inventory quality gate | Clusters, namespaces, workloads, pods in Tsuga |
| 5 | Default operating dashboards | Scoped cluster, node, pod, and Collector health views |
| 6 | Actionable monitors | Owned alerts with tested routing and silences |
This guide collects cluster, node, and container telemetry. Instrument application code separately for service.name and Service page coverage, and configure custom log routing/Grok parsing separately when container stdout is not enough.
Before starting
- Cluster identity: pick one stable
k8s.cluster.namefor all filtering and attribution. - Secrets: create
tsuga-credentials(TSUGA_API_KEYandTSUGA_OTLP_ENDPOINT) through your secret manager. Never commit either to values files. - Prerequisites: for the Operator-managed stack, ensure OpenTelemetry Operator CRDs and
cert-managerare installed (or enable Operator install in the chart). - Scope and access: agree on in-scope namespaces/nodes and confirm Kubernetes RBAC plus outbound HTTPS to Tsuga.
Choose one deployment configuration
Run one deployment path per cluster to avoid duplicate telemetry. Create the tsuga-credentials secret before installing either chart.
Option A - Tsuga Kubernetes stack (default)
Use the supported Operator-managed chart when you want the agent DaemonSet and cluster receiver managed together. Save as tsuga-kube-stack-values.yaml:
clusterName: "<CLUSTER_NAME>"
opentelemetry-operator:
enabled: true
secret:
create: false
name: tsuga-credentials
Option B - Community OpenTelemetry Collector chart
Use the upstream OpenTelemetry Collector Helm chart when your platform team owns Collector releases directly. Deploy the two values files below as separate Helm releases; presets generate the required mounts and RBAC.
otel-agent-values.yaml
mode: daemonset
image:
repository: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s
command:
name: otelcol-k8s
extraEnvsFrom:
- secretRef:
name: tsuga-credentials
presets:
logsCollection:
enabled: true
hostMetrics:
enabled: true
kubeletMetrics:
enabled: true
kubernetesAttributes:
enabled: true
config:
processors:
resource/cluster:
attributes:
- key: k8s.cluster.name
value: "<CLUSTER_NAME>"
action: upsert
cumulative_to_delta: {}
exporters:
otlp_http/tsuga:
endpoint: ${env:TSUGA_OTLP_ENDPOINT}
compression: gzip
headers:
Authorization: Bearer ${env:TSUGA_API_KEY}
retry_on_failure:
enabled: true
timeout: 30s
service:
pipelines:
logs:
receivers: [otlp]
processors: [memory_limiter, k8s_attributes, resource/cluster, batch]
exporters: [otlp_http/tsuga]
metrics:
receivers: [otlp, prometheus]
processors: [memory_limiter, k8s_attributes, resource/cluster, cumulative_to_delta, batch]
exporters: [otlp_http/tsuga]
traces:
receivers: [otlp]
processors: [memory_limiter, k8s_attributes, resource/cluster, batch]
exporters: [otlp_http/tsuga]
otel-cluster-values.yaml
mode: deployment
replicaCount: 1
image:
repository: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s
command:
name: otelcol-k8s
extraEnvsFrom:
- secretRef:
name: tsuga-credentials
presets:
clusterMetrics:
enabled: true
kubernetesEvents:
enabled: true
kubernetesAttributes:
enabled: true
config:
processors:
resource/cluster:
attributes:
- key: k8s.cluster.name
value: "<CLUSTER_NAME>"
action: upsert
cumulative_to_delta: {}
exporters:
otlp_http/tsuga:
endpoint: ${env:TSUGA_OTLP_ENDPOINT}
compression: gzip
headers:
Authorization: Bearer ${env:TSUGA_API_KEY}
retry_on_failure:
enabled: true
timeout: 30s
service:
pipelines:
logs:
receivers: [otlp]
processors: [memory_limiter, k8s_attributes, resource/cluster, batch]
exporters: [otlp_http/tsuga]
metrics:
receivers: [otlp, prometheus]
processors: [memory_limiter, k8s_attributes, resource/cluster, cumulative_to_delta, batch]
exporters: [otlp_http/tsuga]
traces:
receivers: [otlp]
processors: [memory_limiter, k8s_attributes, resource/cluster, batch]
exporters: [otlp_http/tsuga]
Point workloads to their node-local Collector address (localhost works only when sharing the Collector’s network namespace).
Level 1 - Node-level collection with the agent DaemonSet
Run one agent per eligible node for local OTLP reception, host/kubelet/Collector self-metrics, and k8s_attributes enrichment. Expose receivers only to required senders, and keep pipeline order strict: memory_limiter first → k8s_attributes → filtering/redaction → batch.
Exit criteria: One ready agent Pod per intended node; a test trace, metric, and log sent to the node-local endpoint arrive in Tsuga with stable k8s.cluster.name.
# Confirm recent kubelet node CPU metrics arrived for the cluster
tsuga aggregation scalar \
--data '{
"timeRange": {"from": <from-unix-seconds>, "to": <to-unix-seconds>},
"dataSource": "metrics",
"queries": [{
"aggregate": {"type": "sum", "field": "k8s.node.cpu.time"},
"filter": "context.k8s.cluster.name:<cluster>"
}],
"formula": "q1"
}'
Validate the node-local OTLP receiver separately with a test application trace, metric, and log.
Level 2 - Cluster-level collection with the cluster receiver
Run a dedicated Deployment for Kubernetes API metrics and events. Scale replicas only with leader election or sharding to prevent duplicate cluster metrics, and add extra object watches only for a named use case (they expand API-watch load and RBAC scope).
Exit criteria: The cluster receiver is ready, cluster/namespace/workload/pod/node metrics and Kubernetes events appear in Tsuga.
# Confirm cluster discovery with node-readiness and pod-phase counts
tsuga kubernetes clusters --search <cluster>
If you also configured an explicit kube-apiserver Prometheus scrape (not enabled by default), validate it separately:
tsuga aggregation scalar \
--data '{
"timeRange": {"from": <from-unix-seconds>, "to": <to-unix-seconds>},
"dataSource": "metrics",
"queries": [{
"aggregate": {"type": "sum", "field": "apiserver_request_total"},
"filter": "context.k8s.cluster.name:<cluster>"
}],
"formula": "q1"
}'
If that returns nothing, check the metric catalog for the exact name emitted by your scrape job before changing the query.
Level 3 - Container logs with Kubernetes context and trace correlation
Collect container stdout/stderr through the node agent’s filelog path, unwrap the container runtime wrapper, parse structured JSON where used, and attach cluster, namespace, pod, container, node, and workload identity.
Keep service.name consistent across logs, metrics, and traces, promote trace_id and span_id to top-level fields, and derive service identity from Kubernetes metadata or structured logs on shared receivers.
Exit criteria: A known container log is searchable by cluster, namespace, pod, and service.name, and a log from a traced request opens its trace.
tsuga logs search \
--query "context.k8s.cluster.name:<cluster> context.k8s.namespace.name:<namespace> context.service.name:<service> <unique-log-token>" \
--from -15m \
--to now \
--max-results 10
Level 4 - Verify Kubernetes inventory
Treat Tsuga’s Kubernetes views as your data-quality gate before touching application SDKs. Confirm clusters, namespaces, Deployments, StatefulSets, DaemonSets, and Pods render with health/resource data and pivot cleanly into scoped logs, spans, and Analytics.
Exit criteria: In-scope clusters, namespaces, and workloads appear with accurate identity, pod views pivot to scoped logs and spans, and internal namespaces are intentionally included or excluded.
Level 5 - Deploy default Kubernetes dashboards
The Collector chart provisions telemetry and inventory, not dashboards. Deploy your agreed dashboard pack covering cluster overview, nodes, namespaces, workloads, pods, resource pressure, restarts, and Collector health, validating every widget and pivot against live data.
Exit criteria: Owned dashboards are deployed with agreed filters, and clicking a chart point pivots directly to scoped logs or traces.
Level 6 - Create actionable monitors
Create cluster-scoped monitors only after inventory and dashboards are reliable, assign priority and owning team, and test both notification delivery and a maintenance silence:
- Nodes: readiness loss and node memory/disk/PID pressure.
- Pods: CrashLoopBackOff, restart spikes, Pending, or readiness degradation.
- Workloads: Deployment, StatefulSet, and DaemonSet replica shortfalls.
- Saturation: sustained CPU or memory saturation against requests/limits.
- Collector health: export errors, queue pressure, drops, or missing node-agent coverage.
Use static thresholds for known limits, aggregate noisy short-lived pod/event bursts before paging, and add anomaly or new-error-pattern monitors only where a clear response exists.
Exit criteria: Selected monitors are owned, scoped, routed, and verified with a test alert and documented first response.
Troubleshooting path
| Symptom | Check first | Fix |
|---|---|---|
| No telemetry arrives | Exporter auth, endpoint, Collector logs | Verify tsuga-credentials secret and outbound HTTPS |
| Cluster missing from K8s inventory | Cluster receiver readiness, RBAC, k8s.cluster.name | Fix k8s_cluster receiver or resource/cluster processor before editing app SDKs |
| Pods lack node/kubelet metrics | DaemonSet scheduling (taints/tolerations) and kubelet TLS | Confirm agent runs on every node and kubelet scrapes succeed |
| Duplicate cluster metrics | Cluster receiver replicaCount | Keep replicaCount: 1 or enable leader election |
| Logs missing K8s metadata | k8s_attributes pipeline order and pod association | Place k8s_attributes after memory_limiter and before batch |
Completion criterion
A known container log is searchable in Tsuga with the agreed cluster, namespace, pod, and service.name, and the same cluster is explorable in Tsuga’s Kubernetes views with live node and workload metrics.
References
Written by
Nicolas Narbais
Nicolas Narbais builds, breaks, debugs, and scales observability systems using OpenTelemetry and modern telemetry pipelines. He shares practical, opinionated lessons to help engineers get better signal with less noise.
Olatuak Editorial Philosophy
Better signal, not more telemetry.
Olatuak helps platform engineers, SREs, and observability teams turn noisy telemetry into clear operational decisions without blindly collecting more data.
