Install the Collector for Kubernetes using Helm π
You can install the Splunk Distribution of the OpenTelemetry Collector for Kubernetes using a Helm chart to define, install, and upgrade Kubernetes applications.
Note
See also Install the Collector for Kubernetes with YAML manifests.
Use the Helm chart to do the following:
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 Collector for Kubernetes 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, the default values.yaml configuration file could require additional updates.
Prerequisites π
You need the following resources to use the chart:
Helm 3 . Helm 2 is not supported. For more information on the version skew supported between Helm and Kubernetes see Helm Version Support Policy .
Administrator access to your Kubernetes cluster.
Prerequisites: Destination π
The Collector for Kubernetes requires a destination: 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 example:"http://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 .
Note
The Collector for Kubernetes uses 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 repo:
helm repo add splunk-otel-collector-chart https://signalfx.github.io/splunk-otel-collector-chart
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-collector
For 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-collector
For 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-collector
Specify a namespace to deploy the chart to with the
-n
argument:helm -n otel install my-splunk-otel-collector -f values.yaml splunk-otel-collector-chart/splunk-otel-collector
Caution
The values.yaml file lists all supported configurable parameters for the Helm chart, along with a detailed explanation of each parameter. Review it to understand how to configure this chart.
You can also configure the Helm chart to support different use cases, such as trace sampling and sending data through a proxy server. See Examples of chart configuration for more information.
Configure other parameters π
You can configure the following:
For example:
helm repo add splunk-otel-collector-chart https://signalfx.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-collector
Read 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
isWindows
totrue
to apply the Kubernetes cluster with Windows worker nodes.For logs, see Collect logs and events with the Collector for Kubernetes.
Set Helm using a YAML file π
You can also set Helm values as arguments using a YAML file. For example, after creating a YAML file named my_values.yaml, 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-collector
Set Prometheus metrics π
Set the Collector to automatically scrape any pod emitting Prometheus by adding this property to the Helm chartβs values YAML:
autodetect:
prometheus: true
Add 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 chart is deployed successfully, the output displays a message informing that the Splunk Distribution of the OpenTelemetry Collector for Kubernetes is being deployed in your Kubernetes cluster, the last deployment date, and the status.
Use the Kubernetes Operator in OpenTelemetry π
Using the Splunk Helm chart, you can install the Splunk Collector along with an upstream OpenTelemetry Kubernetes Operator for Auto Instrumentation. For more information, see Automatic discovery and configuration 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.
Note
The upstream Kubernetes Operator is not related to the Splunk Operator for Kubernetes, which is used to deploy and operate Splunk Enterprise deployments in a Kubernetes infrastructure.
Next steps π
After installing the package you can: