For pre-provisioned environments, DKP has introduced nvidia-runfile flag for Air-gapped Pre-provisioned.

  1. Create the secret that GPU nodepool would use, this secret is populated from the KIB overrides. In this example we have a file called, overrides/nvidia.yaml

    gpu:
      types:
        - nvidia
    CODE

2. Create a secret on the bootstrap cluster that is populated from the above file. We will name it ${CLUSTER_NAME}-user-overrides

/kubectl create secret generic ${CLUSTER_NAME}-user-overrides --from-file=overrides.yaml=overrides/nvidia.yaml
CODE

3. Create an inventory and nodepool with the instructions below and use the $CLUSTER_NAME-user-overrides.yaml.

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:

    apiVersion: infrastructure.cluster.konvoy.d2iq.io/v1alpha1
    kind: PreprovisionedInventory
    metadata:
      name: ${MY_NODEPOOL_NAME}
    spec:
      hosts:
        - address: ${IP_OF_NODE}
      sshConfig:
        port: 22
        user: ${SSH_USERNAME}
        privateKeyRef:
          name: ${NAME_OF_SSH_SECRET}
          namespace: ${NAMESPACE_OF_SSH_SECRET}
    YAML
  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}
    BASH


For more information, see Pre-provisioned Create and Delete Nodepools and Pre-provisioned Air-gapped Prerequisites.