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

Install the Collector for Kubernetes πŸ”—

The Splunk Distribution of OpenTelemetry Collector for Kubernetes is a Helm chart for the Splunk Distribution of OpenTelemetry Collector. Use Helm charts to define, install, and upgrade Kubernetes applications.

Install the chart using one of these methods:

Install the Collector with Helm chart πŸ”—

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.

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 values.yaml configuration file could require additional updates.

Required resources πŸ”—

You need the following resources to use the chart:

Deploy the Helm chart πŸ”—

Run the following commands to deploy the Helm chart:

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

Replace the parameters with their appropriate values. Apply the following for distributions:

# aks deployment
--set distribution=aks,cloudProvider=azure

# eks deployment
--set distribution=eks,cloudProvider=aws

# eks/fargate deployment (with recommended gateway)
--set distribution=eks/fargate,gateway.enabled=true,cloudProvider=aws

# gke deployment
--set distribution=gke,cloudProvider=gcp

# gke/autopilot deployment
--set distribution=gke/autopilot,cloudProvider=gcp

# openshift deployment (openshift can run on multiple cloud providers, so cloudProvider is excluded here)
--set distribution=openshift

To set your cloud provider and configure cloud.platform for the resource detection processor, use:

--set cloudProvider={azure|gcp|eks|openshift}

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. Options include:

  • Set isWindows to true to apply the Kubernetes cluster with Windows worker nodes.

  • Set networkExplorer.enabled to true to use the default values for splunk-otel-network-explorer.

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"

Additional configuration resources πŸ”—

See examples of Helm chart configuration for additional chart installation examples or upgrade commands to change the default behavior.

Verify the deployment πŸ”—

If the chart is deployed successfully, the output displays a message informing that the Splunk Distribution of OpenTelemetry Collector for Kubernetes is being deployed in your Kubernetes cluster, the last deployment date, and the status.

Install the Collector with resource YAML manifests πŸ”—

Note

To specify the configuration, you at least need to know your Splunk realm and base64-encoded access token.

A manifest specifies the state you want to apply to a Kubernetes object when you apply the configuration file. Each configuration file can contain multiple resource manifests.

Apply resource manifests using the kubectl create command. The manifests are configured with all telemetry types enabled for the agent, which is the default when installing the Helm chart. These manifests should be configured for Splunk Observability Cloud only.

Do the following to deploy the Splunk Distribution of OpenTelemetry Collector for Kubernetes using resource manifests:

  1. Determine which mode you want to use, Agent mode or Gateway mode. By default, Agent mode is configured to send data directly to Splunk SaaS endpoints. Agent mode can be reconfigured to send to a gateway.

  2. Download the necessary manifest files for desired Agent or Gateway modes from the rendered manifests repository.

  3. Update the secret.yaml manifest with your base64-encoded access token as the splunk_observability_access_token data field value.

  4. Update the applicable Agent, Gateway, and cluster receiver ConfigMap files to point to your Splunk Realm.

  5. Apply the manifests using kubectl, as shown in the following examples.

For Agent mode, download the agent-only manifest directory on GitHub for pre-rendered Kubernetes resource manifests that can be applied using the kubectl apply command after being updated with your token and realm information:

kubectl apply -f <agent-manifest-directory> --recursive

For Gateway mode, download the gateway-only manifest directory on GitHub for pre-rendered Kubernetes resource manifests that can be applied using the kubectl apply command after being updated with your token and realm information:

kubectl apply -f <gateway-manifest-directory> --recursive

Install the Collector for the Kubernetes Operator (Alpha) πŸ”—

Caution

This project is Alpha. Do not use in production.

The Splunk Distribution of OpenTelemetry Collector for Kubernetes Operator is an implementation of a Kubernetes Operator. This operator helps deploy and manage the Splunk Distribution of OpenTelemetry Collector for Kubernetes. See the README file in GitHub for installation instructions.

Collect resources with the kubectl plugin πŸ”—

The Splunk kubectl plugin collects Kubernetes resources into a zip file.

The plugin contains the following resources:

  • kubectl-splunk, which is a wrapper around kubectl for managing the Splunk Distribution of OpenTelemetry Collector for Kubernetes.

  • kubectl-splunk describe, which is a command that describes any Kubernetes resource (for example, pods, daemonsets, configmaps) that is automatically filtered by app=splunk-otel-collector.

  • kubectl-splunk get, which is a command that can be used to retrieve any Kubernetes resource (for example, pods, daemonsets, configmaps) that is automatically filtered by app=splunk-otel-collector.

  • kubectl-splunk status, which is a longer description that spans multiple lines and likely contains examples and usage of using your command.

Next steps πŸ”—

After installing the package, you can: