Data Connections

Connecting a Kubernetes cluster

Deploy the DigiUsher Kubernetes agent with Helm and connect cluster metrics to DigiUsher.

Overview

DigiUsher connects to Kubernetes through the digiusher-k8s-agent Helm chart. The agent runs inside your cluster, collects Kubernetes metadata and usage metrics, and pushes the data to DigiUsher with a token generated when you create the Kubernetes data source.

The chart installs these components:

ComponentPurpose
digiusher-k8s-apiInternal API service that receives remote-write metrics from the collector
digiusher-k8s-uploaderUploads buffered metrics to DigiUsher
digiusher-k8s-redisBuffers metrics before upload
Grafana AlloyScrapes Kubernetes and kubelet metrics
kube-state-metricsExposes Kubernetes object metadata used by DigiUsher

Prerequisites

RequirementDetails
HelmHelm must be installed locally. See the Helm documentation if you need to install it.
Kubernetes accessUse a kubeconfig context with permission to create namespaces, workloads, services, service accounts, config maps, secrets, and persistent volume claims.
DigiUsher accessYou need permission to create a Kubernetes data source in DigiUsher.
Outbound accessThe agent uploader must be able to reach https://app.digiusher.com/api/v3.
StorageThe default Redis deployment creates a 4Gi persistent volume claim.

Keep the default namespace

Install the chart in the digiusher-k8s namespace unless DigiUsher support instructs you to customize the chart. The default collector configuration references services in this namespace.

Connect the Data Source

Create the Kubernetes Data Source

  1. Open DigiUsher App.
  2. Go to Connectors which is grouped under System.
  3. Click Add Source.
  4. Select Kubernetes and click continue.
  5. Enter a Display Name for the cluster.
  6. Continue to the confirmation step and click Save Data Source.

DigiUsher generates an API token when the Kubernetes data source is created. Copy the token when it is shown in the UI.

This token is shown again

The Kubernetes API token is always shown in the connectors page.

Add the DigiUsher Helm Repository

helm repo add digiusher https://digiusher.github.io/helm-charts
helm repo update

You can confirm the chart is available with:

helm search repo digiusher

Install the Kubernetes Agent

Replace <insert_api_token> with the token shown by DigiUsher when you created the Kubernetes data source.

helm install digiusher-k8s-agent digiusher/digiusher-k8s-agent \
  --set uploader.env.digiusher_k8s_api_token=<insert_api_token> \
  --namespace digiusher-k8s \
  --create-namespace

The token is stored in a Kubernetes secret named digiusher-k8s-api-token with the key K8S_API_TOKEN.

Verify the Installation

Check the Helm release:

helm status digiusher-k8s-agent --namespace digiusher-k8s

Check that the DigiUsher workloads are running:

kubectl get pods --namespace digiusher-k8s

Check the services created by the chart:

kubectl get services --namespace digiusher-k8s

After the agent starts successfully, Kubernetes data will appear in DigiUsher after the first successful upload and processing cycle.

Configuration Reference

The default install command is recommended for most clusters. The chart exposes additional values for advanced environments.

Helm valueDefaultDescription
uploader.env.digiusher_k8s_api_token<replace_me>Token generated by DigiUsher for the Kubernetes data source. Required.
uploader.env.digiusher_k8s_api_urlhttps://app.digiusher.com/api/v3DigiUsher API endpoint used by the uploader.
api.service.typeClusterIPInternal service type for digiusher-k8s-api.
api.service.port8111Internal API service port used by the collector remote-write pipeline.
redis.enabledtrueDeploys Redis as the local metrics buffer.
redis.pvc.size4GiPersistent volume claim size for Redis.
serviceAccount.namedigiusher-k8s-agent-saService account used by the agent components.
global.environment.shared.redis_max_buffer_size_sec86400Maximum Redis buffer window in seconds.
global.environment.shared.grace_period_seconds120Grace period before buffered data is processed.

Advanced configuration

If you need to change namespaces, image settings, node selectors, tolerations, affinity, resource limits, or Redis settings, create a values file and pass it with helm install -f values.yaml. Keep the required token value set through a secret management process appropriate for your environment.

Collected Metrics

The default chart configuration collects Kubernetes metadata and resource usage required for DigiUsher Kubernetes cost allocation and rightsizing. The collection pipeline includes kube-state-metrics, cAdvisor metrics, and kubelet volume statistics.

SourceExamples of collected data
kube-state-metricsNamespaces, nodes, pods, deployments, daemonsets, replica sets, services, jobs, persistent volumes, persistent volume claims, storage classes, resource quotas
cAdvisorContainer CPU usage, memory usage, network receive bytes, network transmit bytes
kubeletPersistent volume used bytes, capacity bytes, and available bytes

Upgrade the Agent

Refresh the Helm repository and upgrade the release:

helm repo update
helm upgrade digiusher-k8s-agent digiusher/digiusher-k8s-agent \
  --set uploader.env.digiusher_k8s_api_token=<insert_api_token> \
  --namespace digiusher-k8s

If you installed the chart with a custom values file, include the same file during upgrade:

helm upgrade digiusher-k8s-agent digiusher/digiusher-k8s-agent \
  -f values.yaml \
  --namespace digiusher-k8s

Uninstall the Agent

To remove the DigiUsher Kubernetes agent from the cluster:

helm uninstall digiusher-k8s-agent --namespace digiusher-k8s

If you no longer need the namespace and any remaining resources in it, remove the namespace separately:

kubectl delete namespace digiusher-k8s

Deleting the namespace removes all resources inside it

Only delete the digiusher-k8s namespace if it is dedicated to the DigiUsher agent.

Troubleshooting

IssueWhat to Check
Helm cannot find the chartRun helm repo add digiusher https://digiusher.github.io/helm-charts and helm repo update, then retry helm search repo digiusher.
Pods are not startingRun kubectl describe pod <pod-name> --namespace digiusher-k8s and check image pull, scheduling, persistent volume, and resource errors.
Token secret is missingConfirm the install command included --set uploader.env.digiusher_k8s_api_token=<insert_api_token>.
Uploader cannot send dataConfirm cluster egress allows https://app.digiusher.com/api/v3.
No Kubernetes data appears in DigiUsherConfirm all pods in digiusher-k8s are running, then wait for the first upload and processing cycle to complete.

Please contact the DigiUsher Support Team at support@digiusher.com if you have any questions or face any issues.