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

WARNING: You can deploy Kaptain to a cluster in a selected workspace. If you do not intend to deploy Kaptain to a certain cluster, you must switch the workspace you are deploying to or move that cluster to another workspace.

Requirements

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

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.

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

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.

Prerequisites

  • A DKP cluster with the following Platform applications enabled:

    • Istio
    • Knative (optional, if KServe is configured to work in RawDeployment mode)
  • kubectl on your installation machine

  • For customers deploying in a multi-cluster environment (Enterprise): Ensure you have configured Kaptain to authenticate with a Management Cluster.

  • Ensure the following applications are enabled in Kommander:

    1. Use the existing Kommander configuration file, or initialize the default one:

      dkp install kommander --init > kommander-config.yaml
      
    2. Ensure the following applications are enabled in the config:

      apiVersion: config.kommander.mesosphere.io/v1alpha1
      kind: Installation
      apps:
        ...
        dex:
        dex-k8s-authenticator:
        kube-prometheus-stack:
        istio:
        knative:
        minio-operator:
        traefik:
        nvidia:  # to enable GPU support
        ...
      
    3. Apply the new configuration to Kommander:

      dkp install kommander --installer-config kommander-config.yaml
      

Review the Kommander installation documentation for more information.

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.

Load the Docker images into your Docker registry

  1. Download the image bundle file:

    • 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 link obtained from support.

  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