Skip to main content
Version: 1.6.x

Zipkin Cleanup

Since TSB 1.6, Zipkin Backend was replaced by OAP, and after the upgrade, Zipkin-related components and resources should be manually cleaned up.

The following zipkin items need to be cleared after the upgrade:

Clean up Zipkin in the control plane

note

Do not delete zipkin service, it is now served by the OAP deployment.

kubectl -n ${CONTROL_NAMESPACE} delete deployment zipkin
kubectl -n ${CONTROL_NAMESPACE} delete configmap zipkin-envoy-config
kubectl -n ${CONTROL_NAMESPACE} delete secret zipkin-token
kubectl -n ${CONTROL_NAMESPACE} delete secret zipkin-envoy-rds-config
kubectl -n ${CONTROL_NAMESPACE} delete serviceaccount zipkin
kubectl -n ${CONTROL_NAMESPACE} delete horizontalpodautoscaler zipkin --ignore-not-found

Clean up Zipkin in the management plane

kubectl -n ${MANAGEMENT_NAMESPACE} delete deployment zipkin
kubectl -n ${MANAGEMENT_NAMESPACE} delete service zipkin
kubectl -n ${MANAGEMENT_NAMESPACE} delete cronjob zipkin-cleanup
kubectl -n ${MANAGEMENT_NAMESPACE} delete configmap zipkin-cleanup-config-yml
kubectl -n ${MANAGEMENT_NAMESPACE} delete secret tsb-zipkin-token
kubectl -n ${MANAGEMENT_NAMESPACE} delete serviceaccount tsb-zipkin
kubectl -n ${MANAGEMENT_NAMESPACE} delete horizontalpodautoscaler zipkin --ignore-not-found

Clean up Zipkin templates and indices in Elasticsearch

note

Do grep zipkin- not grep zipkin.

es_host=<replace_this>
es_port=<replace_this>
es_user=<replace_this>
es_pass=<replace_this>
for tmpl in $(curl -u "$es_user:$es_pass" https://$es_host:$es_port/_cat/templates | \
egrep "zipkin-" | \
awk '{print $1}'); do curl -u "$es_user:$es_pass" https://$es_host:$es_port/_template/$tmpl -XDELETE ; done
for idx in $(curl -u "$es_user:$es_pass" https://$es_host:$es_port/_cat/indices | \
egrep "zipkin-" | \
awk '{print $3}'); do curl -u "$es_user:$es_pass" https://$es_host:$es_port/$idx -XDELETE ; done