Deploy vCluster in an air-gapped environment using a private web server
For installing vCluster Standalone or Private Nodes in air-gapped environments, follow these tutorials:
The standard method for installing vCluster is using Helm with the LoftLabs charts repository. For air-gapped environments without internet access, you'll need to host the Helm chart locally. This guide demonstrates how to use a private GitLab instance as a web server to host the vCluster Helm chart.
Prerequisites
- A web server accessible through HTTP or HTTPS to store the Helm chart and
index.yaml - A private GitLab instance (used in this example)
- A machine with internet access that has the Helm CLI installed
Procedure
Download and host the Helm chart
-
Add and update the Loft Helm repository on a machine with internet access:
helm repo add loft https://charts.loft.sh
helm repo update -
Download the Helm chart to your local disk:
helm pull loft/vcluster --version 0.23.0 -
Store the chart on your web server:
git clone <gitlab-repo-url>
cd <gitlab-repo>
mkdir vcluster
mv vcluster-0.23.0.tgz vcluster/ -
Create an
index.yamlfile and push it to the GitLab repository:helm repo index vcluster --url https://your-private-server.com/your-username/your-private-project/path-to-vcluster-chart
git add -A
git commit -m "Add vCluster Helm chart"
git pushnoteEnsure the URL you specify points to the location where
vcluster-0.23.0.tgzcan be accessible to the target cluster.
Deploy vCluster using the private Helm chart
After hosting the chart, deploy vCluster using either the Helm CLI or the vCluster platform
Use the Helm CLI
helm upgrade --install my-vcluster vcluster \
--values vcluster.yaml \
--repo https://your-private-server.com/your-username/your-private-project/path-to-vcluster-chart-directory \
--version 0.23.0 \
--namespace my-namespace \
--repository-config=''
Use the platform
You can specify the private repository in your vCluster configuration:
Use a template
kind: VirtualClusterTemplate
apiVersion: management.loft.sh/v1
metadata:
name: my-template
spec:
template:
helmRelease:
chart:
repo: https://your-private-server.com/your-username/your-private-project/path-to-vcluster-chart-directory
version: 0.23.0
Use directly in the VirtualClusterInstance CRD
kind: VirtualClusterInstance
apiVersion: management.loft.sh/v1
metadata:
name: my-vcluster
spec:
template:
helmRelease:
chart:
repo: https://your-private-server.com/your-username/your-private-project/path-to-vcluster-chart-directory
version: 0.23.0
After creating the configuration, verify the deployment by creating the virtual cluster through the platform UI.