This tutorial will walk you through running the vms management server, setting up a management backbone on a Kubernetes cluster, and connecting a van to the backbone from a second Kubernetes cluster.
-
Access to at least two Kubernetes clusters, from any provider you choose.
NOTE: The cluster running the management backbone must be an OpenShift cluster as the Management Controller requires routes
-
The
kubectlcommand-line tool, version 1.15 or later (installation guide). -
cert-manager installed on the cluster you are running the management server from
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.2/cert-manager.yaml
You can get the most recent version from https://cert-manager.io/docs/installation/kubectl/
NOTE: cert-manager is included in OpenShift
-
Keycloak instance running and configured for the management-controller. For instructions, see Keycloak setup guide.
-
Helmfile: To deploy cert-manager, PostgreSQL, and the management-server chart from this repository, use the Helmfile under
charts/helmfile/. Start at charts/README.md (full deployment details in charts/helmfile/README.md). The sections below describe a manual YAML-based flow for this tutorial.
Open a new terminal window and run the following commands:
export KUBECONFIG=~/.kube/management-server
<provider-specific login command>Note: The login procedure varies by provider
Note: This must be done on an OpenShift cluster as the Management Controller requires routes
kubectl create namespace vms
kubectl config set-context --current --namespace vmsThe repository no longer includes a top-level yaml/ directory of sample manifests. Deploy cert-manager, Bitnami PostgreSQL (with schema from charts/helmfile/resources/db-setup.sql applied via Helmfile’s init hook), and optionally the management-server chart using charts/helmfile:
cd charts/helmfile
# Edit values/common.yaml for namespaces, storage, and release toggles as needed.
helmfile syncCreate postgres-credentials and keycloak-config Secrets as described in charts/helmfile/README.md. Align your kubectl context and namespace with releases.postgresql.namespace and your management-server namespace.
From the root of the repo, run the following command to install the necessary Node packages. Then, navigate to the management-controller directory.
pnpm install
cd ./components/management-controllerNote: It is required to use pnpm, not npm, as the package manager for the install.
Copy the example env file in /components/management-controller and edit it for your cluster.
cd components/management-controller && cp .env.example .envSet at least PGDATABASE, APP_USER_PASSWORD, APP_SYSTEM_PASSWORD, SKX_STANDALONE_NAMESPACE, VMS_SESSION_SECRET (see .env.example for variables).
To set PGHOST to the cluster IP of the postgres service (if you are not using OpenShift), run:
# Append or merge into .env, e.g.:
echo "PGHOST=$(kubectl -n vms get svc postgres -o json | jq -r .spec.clusterIP)" >> /path/to/.envAlternatively, you can keep exporting variables in your shell; those override values from .env.
If you deployed PostgreSQL with Helmfile, the Bitnami chart applies charts/helmfile/resources/db-setup.sql on first init—you can skip this step unless you are repairing a database or using a custom Postgres install.
To apply the schema manually, run the following from the repository root, piping charts/helmfile/resources/db-setup.sql into psql on the Postgres workload. Set $PGUSER and $PGDATABASE to match your deployment (or use literals).
export PGUSER=access
export PGDATABASE=studiodbkubectl -n vms exec -it statefulsets/postgres -- psql -U $PGUSER -d $PGDATABASE -v APP_USER_PASSWORD=password -v APP_SYSTEM_PASSWORD=password < charts/helmfile/resources/db-setup.sqlkubectl exec -it deployment/postgres -- psql -U $PGUSER -d $PGDATABASE -v APP_USER_PASSWORD=password -v APP_SYSTEM_PASSWORD=password < charts/helmfile/resources/db-setup.sqlTo tear down application objects in the database for maintenance, the optional script charts/helmfile/resources/drop.sql is available (not run by Helmfile).
NOTE: If using minikube, run minikube tunnel in a separate terminal.
Place keycloak.json in components/management-controller/ as described in the Keycloak setup guide; the API server expects it at startup.
From inside the management-controller directory, run:
Note: If you are on OpenShift, you can port-forward localhost port 5432 to your pod/postgres-0 and set
PGHOST=localhost.
# under components/management-controller, run:
node index.jsOpen a new terminal window and run the following commands:
export KUBECONFIG=~/.kube/backbone
<provider-specific login command>kubectl create namespace <backbone-namespace>
kubectl config set-context --current --namespace <backbone-namespace>- Navigate to http://localhost:8085 and open the "backbones" tab
- Create a new backbone and give it a name
- Click on the newly created backbone and click the "Activate" button
- Click "Create site...", give it a name, and select "skx-prototype" as the target platform
- Create an access point on the newly created site with kind: "manage"
- Create a second access point with kind: "van"
- Click the "Bootstrap Step 1" download link and apply the downloaded yaml in your backbone namespace
- Run
kubectl exec -it <vms-site-pod> -c controller -- skxhosts - Copy the output ingress data into the "Upload ingress data" section in the vms console under "Bootstrap Step 2"
- Once the host and port data appear on the "manage" access point, click the "Bootstrap Step 3" download link and apply the downloaded yaml file in your backbone namespace
Open a new terminal window and run the following commands:
export KUBECONFIG=~/.kube/van
<provider-specific login command>Note: The login procedure varies by provider
-
Apply the following crds to your cluster:
kubectl apply -f https://github.com/fgiorgetti/skupper/raw/refs/heads/multi-van/config/crd/bases/skupper_network_crd.yaml kubectl apply -f https://github.com/fgiorgetti/skupper/raw/refs/heads/multi-van/config/crd/bases/skupper_network_link_crd.yaml kubectl apply -f https://github.com/fgiorgetti/skupper/raw/refs/heads/multi-van/config/crd/bases/skupper_inter_network_ingress_crd.yaml kubectl apply -f https://github.com/fgiorgetti/skupper/raw/refs/heads/multi-van/config/crd/bases/skupper_network_access_crd.yaml kubectl apply -f https://github.com/fgiorgetti/skupper/raw/refs/heads/multi-van/config/crd/bases/skupper_certificate_request_crd.yaml
-
Change the skupper-controller deployment to use multi-van images
a. Run
kubectl edit deployment skupper-controller -n skupperb. Swap the kube-adaptor, skupper-router, and controller images for the following:- quay.io/fgiorgetti/kube-adaptor:multi-van
- quay.io/tedlross/skupper-router:multi-van
- quay.io/fgiorgetti/controller:multi-van
-
Run
kubectl edit clusterrole skupper-controller -n skupperand add the following to the skupper.io apiGroups section- networks
- networks/status
- internetworkingresses
- internetworkingresses/status
- networklinks
- networklinks/status
- networkaccesses
- networkaccesses/status
- certificaterequests
- certificaterequests/status
kubectl create namespace van
kubectl config set-context --current --namespace vanskupper site create van-site- In the console, navigate to the "VANs" tab and click "Create Externally-Created VAN..."
- Give it a name and click "Submit"
- Click on the newly created van and navigate to the "Configuration" tab
- Select the configuration type of "VAN Site Connected to the Management Backbone" and select the backbone we created in the previous steps from the dropdown
- Click the "download configuration" button and apply the downloaded yaml in the van namespace
In order to check that the van and backbone are connected and communicating, run the following command in the backbone terminal:
kubectl get routesThere should be two active routes, one for the "manage" access point and another for the "van" access point