Setting up the OpenTelemetry Demo in Kubernetes
The OpenTelemetry demo application can be deployed using Kubernetes.
Prerequisites
If you’d like to follow along, you’ll need the following software:
- git
- Docker
- A Kubernetes cluster v1.23+ (you can use minikube if running locally)
- Helm v3.9
- Splunk Observability Cloud
- Splunk Cloud Platform
You’ll want to have at least 4 GB of RAM available on your machine to run the demo application.
How to use Splunk software for this use case
Install the Splunk Distribution of the OpenTelemetry Collector for Kubernetes
Use the Splunk Observability Cloud guided installation for deploying the Splunk Distribution of the OpenTelemetry Collector for Kubernetes in our Kubernetes cluster. You can find the guidance at Data Management > Available integrations > Splunk OpenTelemetry Collector. Note the following settings:
- Enter the desired name for your Kubernetes cluster, such as “minikube”.

- If deploying the demo application to a public cloud environment such as AWS, Azure, or GCP, select the appropriate settings for Provider and Distribution.
Next, we’ll get a list of commands we can use to deploy the Splunk Distribution of the OpenTelemetry Collector to our Kubernetes cluster using Helm.

After these commands are executed, you should start to see data flowing into Splunk Observability Cloud after a minute or so.

Point to the Splunk Distribution of the OpenTelemetry Collector
Our demo application includes its own OpenTelemetry collector. But for our example, we want to leverage the Splunk Distribution of the OpenTelemetry Collector that’s already running in our Kubernetes cluster, which is already configured to export data to Splunk Observability Cloud.
To do this, we created a custom file named splunk/splunk-values.yaml and included the following environment variables:
env:
- name: OTEL_SERVICE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: "metadata.labels['app.kubernetes.io/component']"
# Ensure services report telemetry to the collector running on the same node
- name: OTEL_COLLECTOR_NAME
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
value: cumulative
- name: OTEL_RESOURCE_ATTRIBUTES
value: service.version={{ .Chart.AppVersion }},deployment.environment=development
This tells each service to utilize the IP address of the node it runs on to connect to the collector.
We also updated the OTEL_RESOURCE_ATTRIBUTES for each service to include the deployment.environment.name attribute.
In our example, we set this to “development”, but feel free to change it if you wish.
Create a namespace for the OpenTelemetry Demo
Next, let’s create a separate namespace to deploy our demo application into.
kubectl create namespace otel-demo
Add the OpenTelemetry Helm Repository
Add the OpenTelemetry Helm repository using the following command:
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
Then ensure it's up-to-date with:
helm repo update
Run the OpenTelemetry Demo
Run the demo application using the following command:
kubectl apply --namespace otel-demo -f ./splunk/opentelemetry-demo.yaml
After a minute or so you should see the application components appearing on the service map by navigating to APM -> Explore in Splunk Observability Cloud.

Next steps
The OpenTelemetry Demo is running, and is sending metrics and traces to Splunk Observability Cloud. Now, to get logs into Splunk Cloud Platform, let's look at Getting Kubernetes log data Into Splunk Cloud Platform with OpenTelemetry.



