Clean Up
The following instructions will help you quickly clean up the resources deployed during the Getting Started exercises:
Delete the TSB Bookinfo resources
View the resources in the bookinfo-ws workspace:
export ORG=tetrate
export TEN=default
export NS=bookinfo
tctl x getall organizations/${ORG}/tenants/${TEN}/workspaces/${NS}-ws
Get a compact list of the resource FQDNs:
tctl x getall organizations/${ORG}/tenants/${TEN}/workspaces/${NS}-ws \
| grep fqn | awk '{ print $2 }' | sort -r | uniq | tee ${NS}-ws.txt
Delete these resources
cat ${NS}-ws.txt | xargs -n 1 tctl delete
Delete the TSB sleep resources
If you did not delete the sleep TSB resources, repeat the process:
export NS=sleep
tctl x getall organizations/${ORG}/tenants/${TEN}/workspaces/${NS}-ws \
| grep fqn | awk '{ print $2 }' | sort -r | uniq | tee ${NS}-ws.txt
cat ${NS}-ws.txt | xargs -n 1 tctl delete
Delete the TenantSetting resource (if used)
tctl delete TenantSetting --org ${ORG} --tenant ${TEN} ${TEN}-setting
Delete the K8s bookinfo resources
The following instructions will delete the remaining resources created in the bookinfo namespace:
export NS=bookinfo
kubectl delete -n ${NS} gateways.install.tetrate.io ${NS}-gw
kubectl delete -n ${NS} -f https://raw.githubusercontent.com/istio/istio/master/samples/bookinfo/platform/kube/bookinfo.yaml
kubectl delete -n ${NS} secret ${NS}-cert
kubectl delete namespace ${NS}
Delete any resources in the sleep namespace
kubectl delete -n sleep -f https://raw.githubusercontent.com/istio/istio/master/samples/sleep/sleep.yaml
kubectl delete namespace sleep