- A clean k8s cluster (tested only with OVHcloud managed k8s)
Note: This example was run from a OVHcloud k8s managed cluster
- Install nginx ingress controller on the cluster
helm upgrade --install ingress-nginx ingress-nginx \
--repo https://kubernetes.github.io/ingress-nginx \
--namespace ingress-nginx --create-namespace --version 4.4.2
- Install cert-manager and cluster issuer
helm repo add jetstack https://charts.jetstack.io
helm upgrade --install cert-manager jetstack/cert-manager \
--namespace cert-manager --create-namespace -f cert-manager/values.yaml --version v1.11.0
kubectl apply -f cert-manager/cluster-issuer.yml
- Install kube-prometheus-stack
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm upgrade --install kube-prometheus-stack prometheus-community/kube-prometheus-stack -f kube-prometheus-stack/values.yaml --namespace monitoring --create-namespace --version 44.3.0
- Install Keystone application
cd keystone
helm upgrade --install keystone .
** Please be patient while the chart is being deployed **
Connect to openstack with the following variables:
export OS_USERNAME=admin
export OS_PASSWORD=******
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_AUTH_URL=https://keystone.57.128.91.118.xip.opensteak.fr/v3/
export OS_IDENTITY_API_VERSION=3
- You can export the variable created from the previous step and create openstack token:
pip install python-openstackclient
openstack token issue
- Install grafana tempo
helm repo add grafana https://grafana.github.io/helm-charts
helm upgrade --install tempo grafana/tempo --set tempo.searchEnabled=true --set tempo.global_overrides.max_search_bytes_per_trace=0
-
Add the grafana datasource: http://tempo.default:3100 (1m)
-
Install opentelemetry operator
kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml
kubectl get pods -n opentelemetry-operator-system
- Install open-telemetry collector
kubectl apply -f otel/collector.yaml
- Install open-telemetry instrumentation
kubectl apply -f otel/instrumentation.yaml
- Edit the Keystone deployment with right annotation
kubectl patch deployment keystone -p '{"spec": {"template":{"metadata":{"annotations":{"instrumentation.opentelemetry.io/inject-python":"true","instrumentation.opentelemetry.io/container-names": "keystone"}}}}}'
- Create a token a check the trace
openstack token issue
Go to https://grafana.57.128.91.118.xip.opensteak.fr/explore
-
Delete grafana datasource
-
Kubectl patch to remove annotation from keystone deployment
kubectl patch deployment keystone --type=json -p='[{"op":"remove","path":"/spec/template/metadata/annotations/instrumentation.opentelemetry.io~1inject-python"}]'
kubectl patch deployment keystone --type=json -p='[{"op":"remove","path":"/spec/template/metadata/annotations/instrumentation.opentelemetry.io~1container-names"}]'
- Delete k8s object
helm uninstall tempo
kubectl delete -f otel/collector.yaml
kubectl delete -f otel/instrumentation.yaml
kubectl delete -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml