In case of a cluster deletion failure in 1.1.5 and later, regardless if an environment is NSX-T or flannel, follow the below procedure to clean up K8S node vms, on-demand service broker database entry and NSX-T objects.
- Delete the bosh deployment by running the command:
bosh delete-deployment -d <failed cluster service instance> --force
- Run the below command to clean up PKS database and orphan NSX-T objects.
pks delete-cluster <failed-cluster-name>
Note: In PKS 1.1.5 and later versions, pks-nsx-t-osb-proxy running on PKS vm has been modified to cleanup NSX-T objects in case of a deletion failure. Cleanup script introduced prior to PKS 1.1.5 was a stop-gap measure introduced to avoid manual cleanup of orphan NSX-T objects that were left out due to failed cluster creation and should not be used anymore.