Restore your Cluster
Prerequisites
You have backed up your cluster.
The cluster expansion you attempted was not successful.
Restore the Cluster
Switch between DKP Enterprise Management and DKP Essential clusters for the following commands. For general guidelines on how to set the context, refer to Provide Context for Commands with a kubeconfig File.
Delete the
KommanderCluster
object on the DKP Enterprise Management cluster:kubectl -n <WORKSPACE_NAMESPACE> delete kommandercluster <KOMMANDER_CLUSTER_NAME> --wait=false
CODEDisable the Flux controllers on the DKP Essential cluster to interrupt the expansion process:
kubectl -n kommander-flux delete deployment -l app.kubernetes.io/instance=kommander-flux
CODEDelete the
kube-federation-system
namespace on the DKP Essential cluster:kubectl get ns kube-federation-system -o json | jq '.spec.finalizers = []' | kubectl replace --raw "/api/v1/namespaces/kube-federation-system/finalize" -f -
CODERestore your cluster’s configuration on the DKP Essential cluster:
velero restore create pre-expansion --from-backup pre-expansion --existing-resource-policy update --wait --namespace kommander
CODE