Docs » Get started with the Splunk Distribution of the OpenTelemetry Collector » Get started with the Collector for Kubernetes » Install the Collector for Kubernetes using Helm

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.

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:

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:

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:

  1. Add the Helm repo:

    helm repo add splunk-otel-collector-chart https://signalfx.github.io/splunk-otel-collector-chart
    
  2. 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
    
  3. 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

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

See an example of a YAML file in GitHub .

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:

This page was last updated on Oct 14, 2024.