How to delete a PKS cluster using pks delete-cluster command
search cancel

How to delete a PKS cluster using pks delete-cluster command

book

Article ID: 316809

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:
  • You are unable to delete a PKS cluster by running the pks delete-cluster command.
  • You would like to get rid of bosh vms, on-demand service broker database entry and NSX-T objects.


Environment

VMware PKS 1.x

Resolution

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.
  1. Delete the bosh deployment by running the command:
bosh delete-deployment -d <failed cluster service instance> --force
  1. 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.