This tutorial requires a docker and Kubernetes cluster, refer to Kind for a local Kubernetes cluster installations and Telemetrygen tool.
kind create cluster -n rejekts-2024 --config kind.yaml
go install github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen@latest
This tutorial uses Prometheus, Grafana, Loki and Tempo as observability backend to store metrics, logs and traces.
Deploy the backend systems:
kubectl apply -f backend.yaml
Install Prometheus via Helm Chart:
helm install prometheus prometheus-community/kube-prometheus-stack --namespace prometheus --create-namespace
For visualisation port forward Grafana:
kubectl port-forward -n backend svc/grafana 3000:3000
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.2/cert-manager.yaml
kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml
Enable the Prometheus Feature Gates
- --feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx,+operator.observability.prometheus
kubectl apply -f otel-local.yaml
kubectl apply -f otel-backend.yaml
kubectl apply -f servicemonitor.yaml
Forward a connection to OpenTelemetry Local
kubectl port-forward svc/local-collector 4317:4317
telemetrygen logs --otlp-insecure --logs 1_000_000
kubectl delete -f otel-backend.yaml
kubectl apply -f otel-backend.yaml