Problem
During the adopt-a-cluster phase it checks your inventory.yaml, cluster.yaml and the runs folder. It is possible that the operation would fail due to a corrupted runs folder.
An example of the error message shows:
error getting PreprovisionedInventory objects: %!w(<nil>)
Solution
Before anything else, check your cluster.yaml file and inventory.yaml for any stray/invalid characters or incorrect values. If everything checks out, you can take the following steps to "rebuild" your runs folder:
- Reverse or undo the changes you did to
cluster.yamlon step 2 of https://archive-docs.d2iq.com/dkp/konvoy/2.1/major-version-upgrade/upgrade/preprovisioned/ to revert to your originalcluster.yamlfile. - Backup your
runsfoldermv runs runs_backup - Re-run
konvoy upto rebuild therunsfolder
Once done, re-run the dkp --kubeconfig=admin.conf prepare-to-adopt cluster preprovisioned to see if you encounter further issues.