When deploying a DKP 2.X cluster, you will first need to create a bootstrap cluster to create the objects necessary to deploy your workload cluster. When running dkp create bootstrap
you may run into an error that resembles the following:
failed to export kubeconfig failed to get cluster internal kubeconfig: command "docker exec --privileged konvoy-capi-bootstrapper-control-plane cat /etc/kubernetes/admin.conf" failed with error: exit status 1
This error can be caused by a dead container remaining on the host. When the cluster-API provider attempts to spin up all the necessary pods for the bootstrap cluster, there is a non-unique naming convention for some of the components, which causes the failure when the new container is launched. To find the problem container, you can run a docker ps -a
on the host you are attempting to deploy your bootstrap cluster to try to find the duplicate container:
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f5fe0114faa7 konvoy-bootstrap:v2.2.0 "/entr…" 30minutes ago Exited 36815->6443/tcp konvoy-capi-bootstrapper-control-plane
In this case, all that needs to be done is to remove the dead container with docker rm konvoy-capi-bootstrapper-control-plane
. Once the dead container is removed, you will be able to continue your deployment of the bootstrap cluster.