pks clusters
bosh -d service_instance-<GUID-Problematic-cluster> vms
pks create-cluster cluster1 -e cluster1.api.pks.io -p medium -n 1After the cluster is created, run the following to display Instance, Process state, VM CIDs, and Disk CIDs command:
bosh -d service-instance_<GUID> is --details --column=Instance --column=Process\ State --column=VM\ CID --column=Disk\ CIDsExample output:
Instance Process State VM CID Disk CIDs apply-addons/12a8a409-c207-4e78-a39d-3e32a6a68e09 - - - master/406f0925-06fc-4f29-af72-33d48abd8e1e running vm-c3980044-5d44-4f7d-a4ec-490e80b78511 disk-1b9814d8-2060-40b2-a724-334bff5f7614 master/539e2364-047d-4e04-bfbb-37ffd86bf3d4 running vm-fc80f758-8269-4c0e-a4e1-892545c39a9b disk-291c8c18-15f7-41a4-bc8b-417f3daa170e master/5765f3ff-80db-46ef-8d8b-c2d5035bc8cb running vm-1b475d16-ddc6-452a-b23e-aa7e07357ba1 disk-acd3807f-0969-4511-989b-171f699ad2b6 worker/c41eac49-6b71-4108-9e3f-c4a9a46b7286 running vm-a6ca3349-6211-44bc-b35d-259c330c5c0f disk-c0c6b0d1-bd38-4a7e-82bb-4a69acefb4e7
BOSH_CLIENT_SECRET='xxxxx' bbr deployment --all-deployments --target xxxx --username xxxxx --ca-cert xxxxx pre-backup-checkbackup:
bosh -d service_instance-<GUID> orphan-disk <Disk CID>
bosh clean-up --all
bosh -d service-instance_xxxxx deploy service-instance_xxxxx_20200623T191343Z/manifest.yml --fix
This command will recreate the VMs of our test cluster (cluster1) and will also make sure that new persistent disks are provisioned and are attached to their corresponding VMs. After successful deployment, you will be able to access the test cluster using the TKG CLI (it might require you to login and get-credentials) but the cluster will not have any workloads running in it (kubectl get all -A) The next step will take care of restoring the stateless workloads for the test cluster.
BOSH_CLIENT_SECRET=xxxx nohup bbr deployment --deployment service-instance_xxxxx --target xxxxx --username pivotal-container-service-xxxxx --ca-cert xxxxx restore --artifact-path service-instance_xxxx_xxxx/Where --artifact-path is the directory which contains the backup artifacts of the test cluster.