There are instances wherein a self-managed cluster (a cluster with CAPI components on the workload cluster) needs to be returned to a state where the bootstrap cluster. Some instances includes needing to load a specific image to be used during the provisioning phase.
Given this requirement, first you would have to create a new bootstrap cluster as specified in https://docs.d2iq.com/dkp/latest/pre-provisioned-bootstrap. Additionally you can create a bootstrap cluster and specify to output the kubeconfig to a file by performing dkp create bootstrap --kubeconfig bootstrap.conf
.
From here, use your workload cluster kubeconfig and the dkp move command with the workload cluster kubeconfig as the source and the bootstrap cluster kubeconfig as the destination.
dkp move --from-kubeconfig <workload_cluster>.conf --to-kubeconfig <bootstrap_cluster.conf>
Resources:
- https://docs.d2iq.com/dkp/latest/pre-provisioned-make-cluster-self-managed
- https://docs.d2iq.com/dkp/latest/pre-provisioned-bootstrap