Manually attach CLI-created cluster
![](../../__attachments/89360826/Enterprise_50%25.png?inst-v=fbc98f0a-f9ae-4d4c-828f-dc0defe966ca)
Manually attach a cluster that was created with the CLI
When you create a cluster in a Workspace namespace using the DKP CLI, it does not attach automatically. To automatically attach a cluster, generate the cluster objects using the DKP CLI --dry-run -o yaml
flags and create a cluster as stated in the Advanced Creation of CLI Clusters guide.
However, if you created the cluster using the CLI, you will still need to attach it. You will be able to see the new cluster in the UI while it is being provisioned. Once provisioning is completed, the status will change to Unattached.
Manually attach a cluster that was created with the CLI
From the CLI find out the name
of the created Cluster
so you can reference it later:
$ kubectl -n <workspace_namespace> get clusters
Attach the cluster by creating a KommanderCluster
:
cat << EOF | kubectl apply -f -
apiVersion: kommander.mesosphere.io/v1beta1
kind: KommanderCluster
metadata:
name: <cluster_name>
namespace: <workspace_namespace>
spec:
kubeconfigRef:
name: <cluster_name>-kubeconfig
clusterRef:
capiCluster:
name: <cluster_name>
EOF