Skip to main content
Skip table of contents

Pre-provisioned Create and Delete Node Pools

Node pools are part of a cluster and managed as a group, and can be used to manage a group of machines using common properties. New default clusters created by Konvoy contain one node pool of worker nodes that have the same configuration.

You can create additional node pools for specialized hardware or other configurations. For example, if you want to tune your memory usage on a cluster where you need maximum memory for some machines and minimal memory on others, you could create a new node pool with those specific resource needs.

NOTE: Konvoy implements node pools using Cluster API MachineDeployments.

Create a node pool

Follow these steps:

  1. Create an inventory object that has the same name as the node pool you’re creating, and the details of the pre-provisioned machines that you want to add to it. For example, to create a node pool named gpu-nodepool an inventory named gpu-nodepool must be present in the same namespace:

    kind: PreprovisionedInventory
      name: ${MY_NODEPOOL_NAME}
        - address: ${IP_OF_NODE}
        port: 22
        user: ${SSH_USERNAME}
          name: ${NAME_OF_SSH_SECRET}
          namespace: ${NAMESPACE_OF_SSH_SECRET}
  2. (Optional) If your pre-provisioned machines have overrides, you must create a secret that includes all of the overrides you want to provide in one file. Create an override secret using the instructions detailed on this page.

  3. Once the PreprovisionedInventory object and overrides are created, create a node pool:

    dkp create nodepool preprovisioned -c ${MY_CLUSTER_NAME} ${MY_NODEPOOL_NAME} --override-secret-name ${MY_OVERRIDE_SECRET}

Delete a node pool

Deleting a node pool deletes both the Kubernetes nodes and their underlying infrastructure. DKP drains all nodes prior to deletion and reschedules the pods running on those nodes.

To delete a node pool from a managed cluster, run the following command:

dkp delete nodepool ${NODEPOOL_NAME} --cluster-name=${CLUSTER_NAME}

The expected output is similar to the following example, indicating the example node pool is being deleted:

INFO[2021-07-28T17:14:26-07:00] Running nodepool delete command         Nodepool=example clusterName=d2iq-e2e-cluster-1 managementClusterKubeconfig= namespace=default src="nodepool/delete.go:80"

Deleting an invalid node pool results in an output similar to this example command output:

dkp delete nodepool ${CLUSTER_NAME}-md-invalid --cluster-name=${CLUSTER_NAME}

INFO[2021-07-28T17:11:44-07:00] Running nodepool delete command               Nodepool=demo-cluster-md-invalid clusterName=d2iq-e2e-cluster-1 managementClusterKubeconfig= namespace=default src="nodepool/delete.go:80"
Error: failed to get nodepool with name demo-cluster-md-invalid in namespace default : failed to get nodepool with name demo-cluster-md-invalid in namespace default : "demo-cluster-md-invalid" not found

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.