OpenTelemetry Demo Kubernetes Deployment
This repository provides a guide to deploying the OpenTelemetry Demo application in a Kubernetes environment. The demo showcases how OpenTelemetry works and can be integrated into your observability stack.
Prerequisites
Before you begin, ensure your environment meets the following requirements:
- Kubernetes 1.24+
- At least 6 GB of free RAM
- Helm 3.14+ (if using Helm for installation)
Installation Options
1. Install Using Helm (Recommended)
Helm simplifies deployment and management of the OpenTelemetry Demo. Follow these steps:
Step 1: Add the OpenTelemetry Helm Repository
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-chartsStep 2: Install the Helm Chart
To install the chart with the release name my-otel-demo, run:
helm install my-otel-demo open-telemetry/opentelemetry-demoNotes:
- Upgrading the Helm chart from one version to another is not supported. To upgrade, delete the existing release and reinstall the updated version.
- Ensure you use Helm chart version 0.11.0 or later to access all features.
2. Install Using kubectl
For direct installation without Helm, use the Kubernetes manifests:
kubectl apply --namespace otel-demo -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-demo/main/kubernetes/opentelemetry-demo.yamlNotes:
- Upgrading these manifests is not supported. To upgrade, delete the existing resources and reinstall the updated version.
- These manifests are generated from the Helm chart and provided for convenience. Using the Helm chart is recommended.
Exposing the Demo Application
To interact with the demo application, you must expose its services outside the Kubernetes cluster. Options include:
Option 1: Expose Services Using kubectl port-forward
To expose the frontendproxy service, use:
kubectl port-forward svc/my-otel-demo-frontendproxy 8080:8080With port-forwarding enabled, access the following URLs:
- Web Store: http://localhost:8080/ (opens in a new tab)
- Grafana: http://localhost:8080/grafana/ (opens in a new tab)
- Load Generator UI: http://localhost:8080/loadgen/ (opens in a new tab)
- Jaeger UI: http://localhost:8080/jaeger/ui/ (opens in a new tab)
- Flagd Configurator UI: http://localhost:8080/feature (opens in a new tab)
Note:
kubectl port-forward requires an active terminal session. Use Ctrl-C to terminate the process.
Option 2: Expose Using Service or Ingress Configurations
Ingress Resource Configuration
For the frontendproxy component, configure ingress resources in your values file:
components:
frontendProxy:
ingress:
enabled: true
annotations: {}
hosts:
- host: otel-demo.my-domain.com
paths:
- path: /
pathType: Prefix
port: 8080Ensure your cluster supports ingress resources.
Service Type Configuration
To configure the frontendproxy as a LoadBalancer, specify:
components:
frontendProxy:
service:
type: LoadBalancerAdvanced Configurations
Browser Telemetry
Specify the OpenTelemetry Collector endpoint in the frontend component:
components:
frontend:
envOverrides:
- name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
value: http://otel-demo.my-domain.com/otlp-http/v1/tracesBring Your Own Backend
To use an existing observability backend, update the OpenTelemetry Collector configuration:
opentelemetry-collector:
config:
exporters:
otlphttp/example:
endpoint: <your-endpoint-url>
service:
pipelines:
traces:
exporters: [spanmetrics, otlphttp/example]Ensure the spanmetrics exporter remains in the pipeline to avoid errors.
Custom Helm Installation with Values File
Use the following command to install with a custom values file:
helm install my-otel-demo open-telemetry/opentelemetry-demo --values my-values-file.yamlFeedback
If you have any questions or issues, visit OpenTelemetry Documentation (opens in a new tab).
For more, visit my blog: docs.ahmadraza.in (opens in a new tab).