Warning
This article was automatically translated by OpenAI (gpt-4o-mini).It may be edited eventually, but please be aware that it may contain incorrect information at this time.
This is a note on how to add the OpenTelemetry Module when installing Zipkin on Kubernetes using Bitnami's Zipkin Helm Chart.
As of the time of writing, it only supports OTLP over http/protobuf.
Tip
The OpenTelemetry Module performs mappings of Resource Attributes to Span Tags compared to the Zipkin Exporter of the OpenTelemetry Collector.
To keep the configuration simple, we will use a service of type LoadBalancer. Feel free to change it to Ingress or other types as needed. Also, download the latest version of zipkin-module-otel. If you want to use a specific version, change the LATEST part to the specific version.
cat <<EOF > helm-values.yaml
---
service:
type: LoadBalancer
extraEnvVars:
- name: MODULE_OPTS
value: "-Dloader.path=/modules/otel -Dspring.profiles.active=otel"
initContainers:
- name: download-modules
image: nicolaka/netshoot
command: [ "sh" ]
args:
- -cex
- |
curl -sSL https://zipkin.io/quickstart.sh | bash -s io.zipkin.contrib.otel:zipkin-module-otel:LATEST:module otel.jar
mkdir -p /modules/otel
mv otel.jar /modules/otel/
volumeMounts:
- name: modules
mountPath: /modules
- name: unjar-modules
image: bitnami/java
command: [ "sh" ]
args:
- -cex
- |
cd /modules/otel
jar -xf otel.jar
rm -f otel.jar
volumeMounts:
- name: modules
mountPath: /modules
extraVolumes:
- name: modules
emptyDir: { }
extraVolumeMounts:
- name: modules
mountPath: /modules
---
EOF
Install it with the following command.
helm upgrade --install -n zipkin zipkin oci://registry-1.docker.io/bitnamicharts/zipkin -f helm-values.yaml --create-namespace --wait
You will see results like the following.
$ kubectl get pod,svc,pvc -n zipkin
NAME READY STATUS RESTARTS AGE
pod/zipkin-7d94745468-dsg47 1/1 Running 0 15m
pod/zipkin-cassandra-0 1/1 Running 0 165m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/zipkin LoadBalancer 10.96.104.206 192.168.107.200 9411:31180/TCP 165m
service/zipkin-cassandra ClusterIP 10.96.142.204 <none> 9042/TCP 165m
service/zipkin-cassandra-headless ClusterIP None <none> 7000/TCP,7001/TCP,7199/TCP,9042/TCP 165m
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE
persistentvolumeclaim/data-zipkin-cassandra-0 Bound pvc-21954a68-55ef-4cba-ad4d-58b751747ac5 8Gi RWO standard <unset> 165m
Note
Confirmed with the following version.
$ helm list -n zipkin
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
zipkin zipkin 1 2025-01-12 22:05:17.002935 +0900 JST deployed zipkin-1.1.1 3.4.4
Access using the sample application.
git clone https://github.com/making/demo-zipkin-otel
cd demo-zipkin-otel
./mvnw clean install -DskipTests
Start the Backend.
java -jar backend/target/backend-0.0.1-SNAPSHOT.jar --management.zipkin.tracing.endpoint=http://192.168.107.200:9411/v1/traces
Start the Frontend.
java -jar frontend/target/frontend-0.0.1-SNAPSHOT.jar --management.zipkin.tracing.endpoint=http://192.168.107.200:9411/v1/traces
Access http://localhost:8080.
Access the Zipkin UI (in this example, http://192.168.107.200:9411).
By pressing the "RUN QUERY" button, you can see traces like the following.
The Bitnami Zipkin Helm Chart uses Cassandra Storage by default to persist trace data.
With this, you can easily build an OpenTelemetry-compatible trace backend.
If you want to send data to the Zipkin OTLP endpoint from the OpenTelemetry Collector, you can add the following configuration.
# ...
exporters:
otlphttp/zipkin:
endpoint: http://zipkin.zipkin.svc.cluster.local:9411
compression: gzip
tls:
insecure: true
# ...
# ...
service:
pipelines:
traces:
receivers:
- otlp
# ...
processors:
# ...
exporters:
- otlphttp/zipkin
# ...
# ...
To uninstall, use:
helm uninstall -n zipkin zipkin