k8s-infra
Helm chart for collecting metrics and logs in K8s
About this chart
K8s-Infra
Monitoring your Kubernetes cluster is essential for ensuring performance, stability, and reliability. The SigNoz k8s-infra Helm chart provides a comprehensive solution for collecting and analyzing metrics, logs, and events from your entire Kubernetes environment.
TL;DR;
helm repo add signoz https://charts.signoz.io
helm install -n platform --create-namespace "my-release" signoz/k8s-infra
Introduction
The k8s-infra chart provides Kubernetes infrastructure observability by deploying OpenTelemetry components and related resources using the Helm package manager.
It enables collection of metrics, logs, and events from your Kubernetes cluster, making it easier to monitor and troubleshoot your infrastructure with SigNoz.
Refer to the documentation for a more detailed explanation of k8s-infra
Prerequisites
- Kubernetes 1.16+
- Helm 3.0+
Installing the Chart
To install the chart with the release name my-release:
helm repo add signoz https://charts.signoz.io
helm -n platform --create-namespace install "my-release" signoz/k8s-infra
These commands deploy K8s-infra on the Kubernetes cluster in the default configuration. The Configuration section lists the parameters that can be configured during installation:
[!NOTE]
Installing K8s-Infra on Windows
Follow these steps to configure k8s-infra for Windows environments.
Use OpenTelemetry Collector Contrib for Windows
OpenTelemetry provides Windows-compatible opentelemetry-collector-contrib container images which can be used for k8s-infra. You must specify the Windows image tags in your Helm values configuration.
Add the following configuration to your Helm values file:
otelAgent: image: tag: 0.123.0-windows-2022-amd64 otelDeployment: image: tag: 0.123.0-windows-2022-amd64Remove Root Path for Host Metrics
The host metrics receiver requires configuring the
root_pathwhen using the host receiver for Linux in containers. However, Windows deployments do not require this configuration and the k8s-infra installation may fail if included. Remove the path from theroot_pathkey underpresets.hostMetricsin your Helm values:presets: hostMetrics: root_path: ""After completing these steps, you can proceed with the standard k8s-infra installation.
[!NOTE] The
kubeletstatsreceiver connects to the kubelet API to collect node and container metrics. By default, it uses the node'sK8S_HOST_IPto ensure reliable connectivity in most IPv4 environments, as this avoids DNS resolution issues seen in some providers. In clusters running IPv6 or dual-stack, the host IP might resolve to an unreachable address, causing connection errors. In such cases, you can update the endpoint to useK8S_NODE_NAMEinstead, which often works better in IPv6 setups. Example configuration:presets: kubeletMetrics: endpoint: "${env:K8S_NODE_NAME}:10250"
Uninstalling the chart
To uninstall/delete the my-release resources:
helm -n platform uninstall "my-release"
See the Helm docs for documentation on the helm uninstall command.
The command above removes all the Kubernetes components associated with the chart and deletes the release.
Deletion of the StatefulSet doesn't cascade to deleting associated PVCs. To delete them:
kubectl -n platform delete pvc --selector app.kubernetes.io/instance=my-release
Sometimes everything doesn't get properly removed. If that happens try deleting the namespace:
kubectl delete namespace platform
[!WARNING]
Breaking Changes
Version 0.16.0
Default OTLP exporter changed from gRPC to HTTP.
presets.otlpExporter.enablednow defaults tofalsepresets.otlphttpExporter.enablednow defaults totrueMigration: if you have set a custom
otelCollectorEndpoint, update it to the OTLP/HTTP endpoint:# SigNoz Cloud otelCollectorEndpoint: https://ingest.<region>.signoz.cloud:443 # Self-hosted SigNoz otelCollectorEndpoint: http://<signoz-otel-collector>:4318[!NOTE] OTLP/HTTP works more reliably across load balancers, ingresses, and proxies than gRPC, and is now the recommended protocol for sending telemetry to both SigNoz Cloud and self-hosted SigNoz. You can still use gRPC by setting
presets.otlpExporter.enabled: trueandpresets.otlphttpExporter.enabled: false.Version 0.15.0
The following changes have been introduced in this version:
- Upgraded the OpenTelemetry Collector to version
0.139.0- Removed deprecated variables from the OpenTelemetry Collector configuration to ensure compatibility with the latest version
Please refer to the upgrade guide for detailed instructions on upgrading k8s-infra to v0.15.0
Version 0.14.1
Configuration Migration Required:
presets.loggingExporterhas been deprecated and must be migrated topresets.debugExporter.This change aligns with OpenTelemetry's deprecation of the logging exporter in favor of the debug exporter.
Migration Example:
Replace this configuration:
presets: loggingExporter: enabled: true verbosity: basic samplingInitial: 2 samplingThereafter: 500With this configuration:
presets: debugExporter: enabled: true verbosity: basic samplingInitial: 2 samplingThereafter: 500
Values
Deploy k8s-infra with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has k8s-infra 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartk8s-infra is pinned at v0.17.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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