Install the Collector for Kubernetes using Helm
Deploy the Splunk Distribution of OpenTelemetry Collector onto your Kubernetes cluster.
You can deploy the Splunk Distribution of the OpenTelemetry Collector on your Kubernetes cluster using the collector's Helm chart. This Helm chart can:
Create a Kubernetes DaemonSet along with other Kubernetes objects in a Kubernetes cluster.
Receive, process, and export metric, trace, and log data for Splunk Enterprise, Splunk Cloud Platform, and Splunk Observability Cloud.
To learn more about the Splunk Distribution of the OpenTelemetry Collector Helm chart, see:
Supported Kubernetes distributions
The Helm chart works with default configurations of the main Kubernetes distributions. Use actively supported versions:
- Minikube. This distribution was made for local developers and is not meant to be used in production.
Minikube was created to spin up various past versions of Kubernetes.
Minikube versions don’t necessarily align with Kubernetes versions. For example, the Minikube v1.27.1 releases notes state the default Kubernetes version was bumped to v1.25.2.
While the chart should work for other Kubernetes distributions, you might need to modify the default settings in its values.yaml configuration file.
Supported Helm versions
The Helm chart works with Helm versions that are still supported or that were released in the last year. Older Helm 3 versions, and all Helm 2 versions, are not supported. For more information on the version skew supported between Helm and Kubernetes, see Helm Version Support Policy.
Required privileges
You must have administrator access to your Kubernetes cluster.
Collector destination
The Splunk Distribution of the OpenTelemetry Collector requires a destination of either Splunk Enterprise or Splunk Cloud Platform (splunkPlatform) or Splunk Observability Cloud (splunkObservability).
Depending on your destination, you need:
To send data to
splunkPlatform:Splunk Enterprise 8.0 or higher.
A minimum of one Splunk platform index ready to collect the log data. This index is used for ingesting logs.
An HTTP Event Collector (HEC) token and endpoint. See Set up and use HTTP Event Collector in Splunk Web and Scale HTTP Event Collector .
splunkPlatform.endpoint. URL to a Splunk instance, for examplehttp://localhost:8088/services/collector.splunkPlatform.token. Splunk HTTP Event Collector token.
To send data to
splunkObservability:splunkObservability.accessToken. Your Splunk Observability Cloud org access token with ingest authorization scope. See Create and manage organization access tokens using Splunk Observability Cloud.splunkObservability.realm. Splunk realm to send telemetry data to. The default isus0. See realms .
main as the default Splunk platform index. You can use annotations to send data to different indexes. See Send logs to different indexes for more information.Deploy the Helm chart
Run the following commands to deploy the Helm chart:
Add the Helm repository:
helm repo add splunk-otel-collector-chart https://.github.io/splunk-otel-collector-chart- Ensure the repository is up to date:
helm repo update Determine your destination.
For Splunk Observability Cloud:
helm install my-splunk-otel-collector --set="splunkObservability.realm=us0,splunkObservability.accessToken=xxxxxx,clusterName=my-cluster" splunk-otel-collector-chart/splunk-otel-collectorFor Splunk Enterprise or Splunk Cloud Platform:
helm install my-splunk-otel-collector --set="splunkPlatform.endpoint=https://127.0.0.1:8088/services/collector,splunkPlatform.token=xxxxxx,splunkPlatform.metricsIndex=k8s-metrics,splunkPlatform.index=main,clusterName=my-cluster" splunk-otel-collector-chart/splunk-otel-collectorFor both Splunk Observability Cloud and Splunk Enterprise or Splunk Cloud Platform:
helm install my-splunk-otel-collector --set="splunkPlatform.endpoint=https://127.0.0.1:8088/services/collector,splunkPlatform.token=xxxxxx,splunkPlatform.metricsIndex=k8s-metrics,splunkPlatform.index=main,splunkObservability.realm=us0,splunkObservability.accessToken=xxxxxx,clusterName=my-cluster" splunk-otel-collector-chart/splunk-otel-collectorSpecify a namespace to deploy the chart to with the
-nargument:helm -n otel install my-splunk-otel-collector -f values.yaml splunk-otel-collector-chart/splunk-otel-collector
Configure other parameters
You can configure the following:
For example:
helm repo add splunk-otel-collector-chart https://.github.io/splunk-otel-collector-chart
helm install my-splunk-otel-collector --set="splunkRealm=us0,splunkAccessToken=xxxxxx,clusterName=my-cluster" --set=distribution={value},cloudProvider={value} splunk-otel-collector-chart/splunk-otel-collectorRead more about Configure the Collector for Kubernetes with Helm and also the advanced Kubernetes config.
See examples of Helm chart configuration for additional chart installation examples or upgrade commands to change the default behavior.
Set
isWindowstotrueto apply the Kubernetes cluster with Windows worker nodes.For logs, see Collect logs and events with the Collector for Kubernetes.
Set Helm values using a YAML file
You can specify Helm values in a YAML file instead of on the command line. For example, you can create my_values.yaml, put command line options in it, and then run the following command to deploy the Helm chart:
helm install my-splunk-otel-collector --values my_values.yaml splunk-otel-collector-chart/splunk-otel-collectorSet Prometheus metrics
Set the Collector to automatically scrape any pod emitting Prometheus metrics by adding this property to the Helm chart’s values YAML:
autodetect:
prometheus: trueAdd this configuration in the resources file for any pods in the deployment:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: /metrics
prometheus.io/port: "8080"Verify the deployment
If the Helm chart deployed successfully, it displays a message indicating that the Splunk Distribution of the OpenTelemetry Collector for Kubernetes is being deployed onto your Kubernetes cluster along with the last deployment date and the status.
Use the Kubernetes Operator in OpenTelemetry
Using the same Helm chart, you can also deploy an upstream OpenTelemetry Kubernetes Operator for zero-code instrumentation. For more information, see Automatic discovery for Kubernetes.
This instance of the Kubernetes Operator is part of the upstream OpenTelemetry Operator project. See the OpenTelemetry Operator documentation in GitHub for more information.
Next steps
After deploying the Helm chart you can: