When creating a new DKP 2.X cluster, you begin by creating a boostrap cluster with "dkp create boostrap". Once your bootstrap cluster is running, if you're following our docs, the "Create a New Cluster" step will have you run:
dkp create cluster aws --cluster-name=${CLUSTER_NAME} \
--dry-run \
--output=yaml \
> ${CLUSTER_NAME}.yaml
This command might change depending on whether you're deploying to a cloud provider or onto preprovisioned machines.
The "--dry-run" flag makes sure that this command does not actually create the cluster, but ensures that the necessary checks are passing. A major benefit of performing a dry run first is that you can generate a default config file to edit before creating the cluster for real. The "--output=yaml" flag will create a <cluster-name>.yaml file in your working directory that you can edit.
We encourage you to inspect that file before creating the cluster to make sure it makes sense for the environment you intend to create. Any edits you make to this file will be used in the cluster creation step.
The most important configurations to inspect are related to how many control plane and worker nodes you intend to create in your cluster.
In the block that starts with "kind: KubeadmControlPlane", scroll down through the "spec:" block and find the "replicas:" value. The default value is 3. This can cause problems if you do not intend to have three control plane nodes, especially if you are using preprovisioned hardware and only provisioned one machine for a control plane.
If you intend to create a test cluster with only one control plane, change this value to 1 before creating the cluster.
The same applies to the "spec.replicas" value under "kind: MachineDeployment". This will control how many worker nodes are installed in your cluster. It defaults to 4, so edit this to reflect the actual amount of worker nodes you intend to have.
There may be other values that are important to edit for your environment, so familiarizing yourself with this file can be helpful to ensure your success with DKP.