nktp

by CodeScriptum

Helm chartv0.3.0Apache-2.0

A scalable, OpenTelemetry pipeline for collecting, processing, and exporting Kubernetes metrics, logs, and traces.

About this chart

NKTP Helm Chart

NVKE Telemetry Pipeline (NKTP) runs OpenTelemetry Collectors on a Kubernetes cluster.

The chart deploys a pipeline that collects a cluster's metrics, logs and traces and exports them over OTLP: a Collector on every node, a scrape pool for large metrics endpoints, a scrape pool for targets without a node, a Kubernetes Event reader, one gateway per signal, and a watchdog for the pipeline's own telemetry. The bundled OpenTelemetry Operator manages the Collectors.

This README covers installing, configuring, and developing the chart. The NKTP documentation, linked at the end of this README, covers each component in depth.

Prerequisites

Provide the following before installing NKTP.

  • Kubernetes 1.31+. The bundled metrics-server 0.8.1 supports 1.31+. Every Collector Pod runs its self-telemetry sidecar as a native sidecar, an init container with restartPolicy: Always, which Kubernetes enables by default from 1.29. The bundled OpenTelemetry Operator 0.162.0 itself supports 1.25+.
  • Helm 4. Choose a release compatible with your Kubernetes version.
  • cert-manager. Required with default values; install it separately. NKTP does not bundle or install it. It issues certificates for internal Collector mTLS, the Operator's admission webhook, and Collector-to-Target-Allocator mTLS. Running without it requires replacing all three integrations. See More information for the "Configure cert-manager" guide covering both options.
  • SSD-backed persistent storage. Required with default values for gateway and watchdog exporter queues. Each replica requests a 1Gi claim; minimum replica counts require eight volumes totaling 8Gi. Claims use the cluster's default StorageClass unless storageClassName is set in each component's kubernetes.volumeClaimTemplates. Without a suitable class, claims may remain pending. If suitable storage is unavailable, configure in-memory queues. See More information for the "Configure exporter queue storage" guide covering both options.
  • Image registry access to docker.io, ghcr.io, quay.io and registry.k8s.io, or mirrors of them. See Image registry.
  • Network access between components. The Kubernetes API server must reach the Operator's admission webhook on TCP 9443 on the nodes; managed clusters can block this with firewall rules or security groups. Node collectors scrape their node's kubelet on TCP 10250 and node-exporter on TCP 9100. Collectors send OTLP to the gateways and watchdog across nodes. Control plane component metrics depend on the distribution, which determines whether those components expose reachable metrics endpoints.
  • Kubernetes resource metrics API (metrics.k8s.io). Required for gateway, large-target and watchdog autoscaling. NKTP does not install metrics-server by default; set metrics-server.enabled: true if nothing else in the cluster provides the API.
  • Privileged Pod Security level for the release namespace. The node collector mounts host paths for pod logs, journald and /proc. node-exporter uses the host network and PID namespaces, host paths, and host port 9100. The baseline and restricted Pod Security levels reject these Pods.
  • Writable node hostPath storage for log checkpoints. Required with default values to persist node log read positions. If host writes are unavailable, disable persistent checkpoints. See More information for the "Configure node log checkpoints" guide covering both options.
  • Capacity. The defaults are sized for large clusters: about 5.2 CPU and 14.9 GiB of memory in requests for the cluster-wide components, plus about 0.6 CPU and 1.2 GiB on every node for the per-node DaemonSets. These budgets assume one NKTP installation per cluster. Multiple releases in the same cluster are untested and unsupported; shared checkpoint hostPaths are one source of contention.

Install

From a checkout, build the chart's dependencies first. Their archives aren't committed. Edit the release name and namespace below, and set NKTP_VALUES_FILE to your Helm values file, or keep nktp/values.yaml for chart defaults. If the namespace already exists, omit its creation command; ensure it has the privileged Pod Security label:

NKTP_RELEASE=nktp
NKTP_NAMESPACE=nktp
NKTP_VALUES_FILE=nktp/values.yaml
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/
helm dependency build nktp
kubectl create namespace "$NKTP_NAMESPACE"
kubectl label namespace "$NKTP_NAMESPACE" pod-security.kubernetes.io/enforce=privileged --overwrite
helm install "$NKTP_RELEASE" ./nktp --namespace "$NKTP_NAMESPACE" --values "$NKTP_VALUES_FILE" --wait

After Helm finishes, run both commands below. Repeat until every Collector's READY column shows all expected replicas ready, such as 2/2, and every Certificate reports READY=True. If you installed without cert-manager, omit the certificate command.

kubectl -n "$NKTP_NAMESPACE" get opentelemetrycollector
kubectl -n "$NKTP_NAMESPACE" get certificate

Upgrading

Review the upgrade notes for your target version, available through More information, and merge the required changes into your Helm values file before upgrading.

If the target chart version updates the bundled OpenTelemetry or Prometheus CRDs, follow Update CRDs before helm upgrade. Helm does not upgrade CRDs installed from a chart's crds/ directory. Leaving outdated CRDs in place can cause fields introduced by the new version to be dropped.

The Operator recreates watchdog and gateway StatefulSets when their volume claim templates change, restarting their Collectors. Queue claims are retained by default.

Use --reset-values for both cases below. It starts from the new chart version's defaults and applies the settings in your values file, if supplied, without carrying forward previously stored settings.

These commands use the published NGC chart and can run from any directory. Edit the release name, existing namespace, target chart version, and kubeconfig path. 0.3.0 is an example; choose the published version you intend to install:

NKTP_RELEASE=nktp
NKTP_NAMESPACE=nktp
NKTP_VERSION=0.3.0
export KUBECONFIG=/path/to/cluster.kubeconfig
helm repo add nvidia https://helm.ngc.nvidia.com/nvidia
helm repo update nvidia

Update CRDs

Run this procedure only if the upgrade notes identify CRD changes.

Use this procedure for CRDs installed by the NKTP chart that you maintain as part of your NKTP installation. If another chart or tool manages a CRD group, you are responsible for updating that group through its managing chart or tool to match the CRD versions bundled with the target NKTP chart before upgrading NKTP. Skip that group in the commands below. If another chart or tool manages both CRD groups, skip this procedure entirely.

If your values file contains opentelemetry-kube-stack.crds.install, remove it before using the per-group flags: true enables both groups and false disables both, overriding the per-group settings. In your values file, keep opentelemetry-kube-stack.crds.installOtel or opentelemetry-kube-stack.crds.installPrometheus set to false for groups managed by another chart or tool; rendering excludes those groups. For example, if your kube-prometheus-stack installation already manages the Prometheus CRDs, set opentelemetry-kube-stack.crds.installPrometheus: false and follow that installation's CRD upgrade procedure.

Before continuing, review compatibility and complete migrations described in the upgrade notes, available through More information. Use credentials with permission to update cluster-scoped CRDs.

Render the target published chart using the version and cluster settings above. First create a temporary directory and save its default values:

RENDER_DIR=$(mktemp -d)
helm show values nvidia/nktp --version "$NKTP_VERSION" \
  > "$RENDER_DIR/default-values.yaml"

If you maintain a Helm values file, change NKTP_VALUES_FILE below to its path; otherwise keep the saved defaults. Use the same values file for the upgrade:

NKTP_VALUES_FILE="$RENDER_DIR/default-values.yaml"
helm template "$NKTP_RELEASE" nvidia/nktp --version "$NKTP_VERSION" \
  --namespace "$NKTP_NAMESPACE" --include-crds -f "$NKTP_VALUES_FILE" \
  --output-dir "$RENDER_DIR"
find "$RENDER_DIR" -type d -name crds -print

Review the diffs for both rendered CRD groups before applying them. Run each command only if its directory appeared in the listing above; omit commands for groups that were not rendered:

OTEL_CRD_DIR="$RENDER_DIR/nktp/charts/opentelemetry-kube-stack/charts/otel-crds/crds"
PROMETHEUS_CRD_DIR="$RENDER_DIR/nktp/charts/opentelemetry-kube-stack/charts/prometheus-crds/crds"
kubectl diff --server-side --field-manager=helm -f "$OTEL_CRD_DIR"
kubectl diff --server-side --field-manager=helm -f "$PROMETHEUS_CRD_DIR"

Check that the diffs are consistent with the upstream changelog changes linked from the upgrade notes. A diff exit status of 1 means changes were found; greater than 1 means an error to resolve before continuing.

CRDs originally installed with Helm 3 or another client-side workflow: the server-side apply commands here may report field ownership conflicts. If a diff reports one, rerun that diff with --force-conflicts, keeping --field-manager=helm. The diff previews the changes without updating the CRDs or transferring ownership.

Review the resulting diff and the fields named in the conflict. If the changes are expected and NKTP should manage those fields, add --force-conflicts to the corresponding apply command below for this update. Forcing an apply overwrites conflicting values and transfers their ownership. If the changes are unexpected, stop before applying CRDs or upgrading the chart. The live CRDs may have been modified by another chart, tool, or administrator outside NKTP. Identify the source of those changes and determine whether they must be preserved before proceeding.

After reviewing the diffs, apply each rendered group you intend to update; omit commands for groups that were not rendered:

kubectl apply --server-side --field-manager=helm -f "$OTEL_CRD_DIR"
kubectl apply --server-side --field-manager=helm -f "$PROMETHEUS_CRD_DIR"

Upgrade the chart

If you use chart defaults, upgrade with the new chart defaults:

helm upgrade "$NKTP_RELEASE" nvidia/nktp --version "$NKTP_VERSION" \
  --namespace "$NKTP_NAMESPACE" \
  --reset-values --wait

If you maintain a values file, update it for the new version and supply it with -f. Include all custom settings you want to keep. Merge custom volume and mount entries into any example lists before applying them.

Edit the values file path below, then upgrade:

NKTP_VALUES_FILE=/path/to/my-values.yaml
helm upgrade "$NKTP_RELEASE" nvidia/nktp --version "$NKTP_VERSION" \
  --namespace "$NKTP_NAMESPACE" \
  --reset-values -f "$NKTP_VALUES_FILE" --wait

Components

ComponentValues keyRuns asPurpose
Node collectordaemonsetDaemonSetReceives OTLP from workloads on its node, and collects pod logs, the journal, host and audit logs, kubelet and cAdvisor metrics, and scrape targets on its node.
Logs, metrics, and traces gatewaysgateway_logs, gateway_metrics, gateway_tracesOne StatefulSet eachExport each signal to the backend.
Large-target metrics poollarge_target_metricsStatefulSetScrapes monitors labeled nktp.nvidia.io/large-target: "true", including the Kubernetes control plane.
Nodeless metrics poolnodeless_metricsStatefulSetScrapes targets that have no node, such as Probes and static ScrapeConfigs.
Cluster event readercluster_eventsStatefulSetReads Kubernetes Events, with one elected replica active at a time.
WatchdogwatchdogStatefulSetReceives the pipeline's own telemetry and exports it to the backend.
kube-state-metricskube-state-metricsDaemonSet and DeploymentsExposes Kubernetes object state as metrics.
OpenTelemetry Operator and CRDsopentelemetry-kube-stackDeploymentCreates the Collectors and their Target Allocators.
node-exporternode-exporterDaemonSetExposes host metrics from every node, tolerating all taints.
metrics-servermetrics-serverDeployment, off by defaultServes the resource metrics API that the autoscalers read.
blackbox-exporterblackbox-exporterDeployment, off by defaultProbes HTTP, TCP, DNS, gRPC and ICMP endpoints for Probe resources.
LGTMotel-lgtmDeploymentDevelopment backend with Grafana, Prometheus, Loki and Tempo. Evaluation only.

The node collectors, the large-target and nodeless pools, and the event reader send each signal to its gateway over OTLP/gRPC with mutual TLS, and the gateways export to the backend. Each Collector Pod runs a sidecar Collector that buffers the Collector's own telemetry and samples its traces. All sidecars except watchdog's send to watchdog over OTLP/gRPC with mTLS on port 4317. The DaemonSet also sends collected Operator and Target Allocator logs directly to that endpoint. Target Allocators push their own metrics to watchdog over plaintext OTLP/gRPC on port 4320. Watchdog exports received telemetry to the backend without passing through the gateways; its own sidecar exports watchdog's telemetry to the backend.

Gateways rotate connections about every minute and watchdog every five minutes so clients can reach newly added replicas. Confi

Deploy nktp with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nktp on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnktp is pinned at v0.3.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply