To export K8s metrics, you can enable different receivers in OpenTelemetry collector which will send metrics about your Kubernetes (K8s) infrastructure to SigNoz. These OpenTelemetry collectors will act as agents which send metrics about K8s to SigNoz.
OtelCollector agent can also be used to tail and parse logs generated by
filelog receiver and send it to desired receiver.
Based on where you are running SigNoz ( e.g. in an independent VM or K8s cluster), you have to provide the address to send data from the above receivers.
Steps to export K8s metrics to SigNoz
By default, SigNoz Helm chart installs
k8s-infra dependency chart which
handles the task of collecting metrics and logs from the K8s cluster.
K8s-Infra helm chart mainly handles the following:
- Tails and parses logs generated by containers in K8s cluster and sends to SigNoz
- Collects kubelet metrics and host metrics from each nodes of the K8s cluster
- Collects cluster-level metrics from the Kubernetes API server
- Acts as a gateway to send any incoming OTLP telemetry data to SigNoz OtelCollector
Skip Step 1 if you have single K8s cluster for SigNoz and your applications
k8s-infra chart is included in default SigNoz chart installation.
Install K8s-Infra chart
helm install my-release signoz/k8s-infra \
If the OtelCollector endpoint is secured, you would have to enable
otelInsecureconfiguration and often make other changes such as including either config or path to the TLS certificate and private key.
In case of SigNoz Cloud, you would have to set
Plot Metrics in SigNoz UI
To plot metrics generated from
k8s-infrachart, follow the instructions given in the docs here.
Check out the List of metrics from Kubernetes receiver.
Import Dashboard with CPU and Memory Metrics
You can import basic dashboard with CPU and Memory metrics of K8s cluster containers from here.
After importing, you can include more widgets using other metrics from the list below.
Generate and Import Dashboard with Node Metrics
To generate node metrics dashboards for each nodes of K8s cluster:
for node in $(kubectl get nodes -o name | sed -e "s/^node\///");
curl -sL https://github.com/SigNoz/benchmark/raw/main/dashboards/hostmetrics/hostmetrics-import.sh \
| HOSTNAME="$node" DASHBOARD_TITLE="Node Metrics Dashboard for $node" bash
After importing the generated dashboards, you can include more widgets as per you need using metrics from the list below.
List of metrics
Kubernetes Metrics - kubeletstats and k8s_cluster
Node Metrics - hostmetrics