Add Kaptain to your DKP Catalog applications on air-gapped environments for DKP 2.1

Add Kaptain to your DKP Catalog applications on air-gapped environments for DKP 2.1

IMPORTANT: Ensure the cluster that you want to use to deploy Kaptain is the only cluster in its workspace. Kaptain is meant to be deployed on workspaces with a single cluster.

NOTE: All DKP commands in this page assume KUBECONFIG=clusterKubeconfig.conf is set.

Requirements

For reference values of the required number of worker nodes, CPU, RAM, and storage resources, refer to the requirements section.

Prerequisites

Ensure you meet all prerequisites.

NOTE: Starting from the 1.3 release, Spark Operator is no longer installed by default with Kaptain.

If you need to run Spark jobs on Kubernetes using Spark Operator, you must install it separately. Use the following instructions to install Spark Operator from Kommander Catalog for DKP 2.x.

DKP 2.1 air-gapped installation

Refer to DKP install instructions, if you want to deploy Kaptain in a networked environment or to DKP 2.2 air-gapped instructions if you are deploying in DKP 2.2.

Kaptain supports installation on an air-gapped (offline or private) DKP managed cluster. Before installing Kaptain, follow the air-gapped installation guide to set up the air-gapped DKP managed cluster. The cluster admin is responsible for configuring the DKP cluster correctly and ensuring container images have been pre-loaded to the private registry, before installing Kaptain.

Load the Docker images into your Docker registry

  1. Download the image bundle files from the support portal:

    • Download kaptain-air-gapped-2.0.0.tar.gz that will contain the required artifacts to perform an air-gapped installation. Extract the image bundle archive and other files before use.

      mkdir bundle && tar -xvf kaptain-air-gapped-2.0.0.tar.gz -C bundle/
      
    • (Optional) Download the custom image artifacts kaptain-air-gapped-2.0.0_cpu.tar.gz or kaptain-air-gapped-2.0.0_gpu.tar.gz based on whether you need CPU or GPU for your workloads. Extract the image bundle archive and other files before use.

      mkdir bundle-cpu && tar -xvf kaptain-air-gapped-cpu.tar.gz -C bundle-cpu/
      mkdir bundle-gpu && tar -xvf kaptain-air-gapped-gpu.tar.gz -C bundle-gpu/
      
  2. Place the bundle in a location where you can load and push the images to your private Docker registry.

  3. Ensure you set the REGISTRY_URL and AIRGAPPED_TAR_FILE variable appropriately, then use the following script to load the air-gapped image bundle:

    #!/usr/bin/env bash
    set -euo pipefail
    IFS=$'\n\t'
    
    readonly AIRGAPPED_TAR_FILE=${AIRGAPPED_TAR_FILE:-"kaptain-image-bundle.tar"}
    readonly REGISTRY_URL=${REGISTRY_URL#https://}
    
    docker load --input "${AIRGAPPED_TAR_FILE}"
    
    while read -r IMAGE; do
        echo "Processing ${IMAGE}"
        REGISTRY_IMAGE="$(echo "${IMAGE}" | sed -E "s@^(quay|gcr|ghcr|docker|k8s.gcr|nvcr).io|public.ecr.aws|mcr.microsoft.com@${REGISTRY_URL}@")"
        docker image tag "${IMAGE}" "${REGISTRY_IMAGE}"
        docker image push "${REGISTRY_IMAGE}"
    done < <(tar xfO "${AIRGAPPED_TAR_FILE}" "index.json" | grep -oP '(?<="io.containerd.image.name":").*?(?=",)')
    

    NOTE: This script is slightly different than the Kommander load script and has different image registry filters.

Based on the network latency between the environment of script execution, the Docker registry, and the disk speed, this can take a while to upload all the images to your image registry.

Install Kaptain using helm

  1. Ensure the KUBECONFIG=clusterKubeconfig.conf is set.

  2. Download the kaptain-2.0.0.tgz chart archive from the support portal.

  3. Add the following to a file named ‘values.yaml’ to pass to the helm install with the following contents:

    ingress:
      kubeflowIngressGatewayServiceAnnotations:
        service.beta.kubernetes.io/aws-load-balancer-internal: "true"
    
  4. Use helm to install Kaptain to your air-gapped cluster:

    helm install kaptain kaptain-2.0.0.tgz --values values.yaml
    

    You may need to specify --kubeconfig=my-air-gap-cluster.conf for the install.

  5. Check the status of the install with:

    helm status kaptain
    

Uninstall Kaptain

If Kaptain was installed using helm, it can be uninstalled with the following:

helm uninstall kaptain

Refer to the installation overview for next steps.