DKP 2.x Air-Gapped Installation
Kaptain supports installation on an air-gapped (a.k.a. offline or private) Konvoy cluster. Before installing Kaptain, please follow the Konvoy Air-Gapped Installation Guide to set up the air-gapped Konvoy cluster. The cluster admin is responsible for configuring the Konvoy cluster correctly and ensuring container images have been pre-loaded to the private registry before installing Kaptain.
Prerequisites for DKP 2.x
For DKP 2.x, ensure the following applications are enabled in Kommander:
- Use the existing Kommander configuration file, or initialize the default one:
kommander install --init > kommander-config.yaml
- 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 ...
- Apply the new configuration to Kommander:
kommander install --installer-config kommander-config.yaml
Check Kommander installation documentation for more information.
In case you need to run Spark jobs on Kubernetes using Spark Operator, it needs to be installed separately. Use the following instructions to install Spark Operator from Kommander Catalog for DKP 2.x.
Load the Docker images into your Docker registry
-
Download the image bundle file:
-
Download
kaptain_air_gapped.tar
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.tar.gz -C bundle/
-
(Optional) Download the custom image artifacts
kaptain_air_gapped_cpu.tar
orkaptain_air_gapped_gpu.tar
based on whether you need CPU or GPU for your workloads. To do so, 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/
-
-
Place the bundle in a location where you can load and push the images to your private Docker registry. Extract the image bundle archive and other files before use:
mkdir bundle && tar -xvf kaptain-air-gapped.tar.gz -C bundle/
-
Ensure you set the
REGISTRY_URL
andAIRGAPPED_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 and the Docker registry as well as the disk speed, this can take a while to upload all the images to your image registry.
Install Kaptain
- When the Konvoy cluster is ready and the images are pushed to the registry, install Kaptain.