---
title: Automate an Air-Gapped Existing Cluster Installation
slug: install-10x/automate-an-air-gapped-existing-cluster-installation
docTags: 
createdAt: 2025-07-16T13:29:40.591Z
---

This topic provides steps for automating an air-gapped Swimlane installation into an existing Kubernetes cluster.

## Other Requirements

A private registry that hosts the initial containers is necessary for an airgapped existing cluster installation.

To automate this process the following files are also needed:

- Swimlane Platform Installer (SPI) license file (ends with `.yaml`)
- Swimlane license file (ends with `.lic`)
- Swimlane offline package
- Swimlane airgap bundle (ends with `.airgap`)

## SPI Kubectl Add-on Installation

In order to automate a Swimlane installation in to an existing cluster, the SPI Kubectl Add-on must be downloaded to and correctly setup on a system with access to the cluster:

For Linux, download and untar the binary file:

:::BlockQuote
curl -sSL -O https\://get.swimlane.io/existing-cluster/install/linux
tar -zxvf linux
mv kots /usr/local/bin/kubectl-kots
:::

For OSX, download and untar the binary file:

:::BlockQuote
curl -sSL -Ohttps\://get.swimlane.io/existing-cluster/install/osx
tar -zxvf osx
mv kots /usr/local/bin/kubectl-kots
:::

## Push SPI Container Images to Your Private Registry

Push SPI container images to your private registry with this code:

:::BlockQuote
kubectl kots admin-console push-images \<path-to-offline-installer-package> \<your-registry-endpoint>/\<your-registry-name> \\
  --registry-username \<your-registry-username> \\
  --registry-password \<your-registry-password>
:::

## Swimlane Installation and Deployment

After the SPI Kubectl Add-on has been installed, install Swimlane with the following command:

:::BlockQuote
kubectl kots install swimlane-platform \\
  --namespace \<Namespace> \ 
  --shared-password \<SPI Admin Console Password> \ 
  --license-file \<SPI License>.yaml \ 
  --config-values \<SPI Config File>.yaml \\
  --airgap-bundle \<Swimlane Airgap Bundle>.airgap \\
  --kotsadm-namespace swimlane-platform \\
  --kotsadm-registry \<your-registry-endpoint>/\<your-registry-name> \\
  --registry-username \<your-registry-username> \\
  --registry-password \<your-registry-password>
  --port-forward=false
:::

### Creating an SPI Config File

The `<SPI Config File>.yaml` file is a YAML-formatted file that outlines the specifications of a Swimlane deployment. You can get the .yaml file from a previously configured installation of SPI or by creating a new file manually.

To obtain a file from an previously configured SPI install, run the following command from a system with access to the kubernetes API and the SPI Kubectl Add-on installed:

`kubectl kots download swimlane-platform -n <namespace>`

This command downloads a copy of the entire SPI deployment specifications to a local folder named `swimlane-platform`.

The config file is located at `./swimlane-platform/upstream/userdata/config.yaml` in the downloaded folder.

To create the file manually, review the configurable options available in the [Existing Cluster SPI](docId\:xVnlRAjYOl06ZDRVZ8OV6).

Here is a basic version of the config file that you can use for an initial single node configuration:

:::BlockQuote
apiVersion: kots.io/v1beta1
kind: ConfigValues
metadata:
&#x20; creationTimestamp: null
&#x20; name: \<Swimlane Namespace>
spec:
&#x20; values:
&#x20;   is\_ha:
&#x20;     value: "0"
&#x20;   mongo\_admin\_user\_password:
&#x20;     value: \<Base64 encoded string>
&#x20;   mongo\_admin\_user\_password\_confirm:
&#x20;     value: \<Base64 encoded string>
&#x20;   mongo\_swimlane\_user\_password:
&#x20;     value: \<Base64 encoded string>
&#x20;   mongo\_swimlane\_user\_password\_confirm:
&#x20;     value: \<Base64 encoded string>
&#x20;   swimlane\_database\_encrypt\_key:
&#x20;     value: \<Base64 encoded string>
&#x20;   swimlane\_database\_encrypt\_key\_confirm:
&#x20;     value: \<Base64 encoded string>
&#x20;   swimlane\_enable\_ingress:
&#x20;     value: "1"
&#x20;   swimlane\_hostname:
&#x20;     value: \<Swimlane Hostname>
&#x20;   swimlane\_ingress\_annotations:                           &#x20;
&#x20;     value: |-                                             &#x20;
&#x20;       \<Insert ingress annotations here>
&#x20;       \<Insert ingress annotations here>
&#x20;   swimlane\_storage\_class:                                 &#x20;
&#x20;     value: \<Storage Class Name>
:::

## Swimlane Initial Login

It will take a few minutes for Swimlane to initialize all of the required components. However, automation can effectively 'wait' for a ready state by waiting for a ready status from different parts of the deployment. There are multiple ways to accomplish this wait period, the following code block is just one example:

:::BlockQuote
kubectl wait -l statefulset.kubernetes.io/pod-name=swimlane-sw-mongo-0 --for=condition=ready pod --namespace \<Swimlane Namespace> --timeout=240s
export SW\_API=$(kubectl get po -n \<NameSpace> --no-headers -o custom-columns="\:metadata.name" | grep -i api)  
kubectl wait --for=condition=ready pod $SW\_API -n \<NameSpace> --timeout=240s                 
:::

Next, continue with the Swimlane install by creating the initial administrative user.

Using your Swimlane license .lic file, first generate the necessary license block for the api call with a curl command:

`curl -kLv -X POST https://<Swimlane URL>/api/settings/license/upload -H 'Content-Type: multipart/form-data' -F file=@<Swimlane License File>.lic`

Then, to create the initial administrative user, insert the returned JSON into the following curl command:

:::BlockQuote
curl -kLv -X POST https\://\<Swimlane URL>/api/settings/install \\
  --header "Content-Type: application/json" \\
  -d '\{"mailSettings":\{},
       "password":"\<Admin Password>","confirmPassword":"\<Admin Password>",
       "databaseEncryptionKey":"",
       "swimlaneUrl":"https\://\<Swimlane URL>",
       "license" :\<Generated JSON Data>,
       "adminUserName":"\<Admin Username>",
       "adminEmail":"\<Admin Email>"}'  
:::

