Kubernetes

To use Airlock Microgateway in your Kubernetes cluster, follow this guide to deploy the Airlock Microgateway Operator and its resources.

Prerequisites

For installation in OpenShift environments, also see the article OpenShift.

Install a cert-manager

You can install the cert-manager with the commands below in the 'VERSION' that you wish to install. You may use the latest cert-manager version (see cert-manager Helm installation instructions), which should work fine in most cases, or install the version we use for internal testing (see tested version of cert-manager for Microgateway 4.3).

copy
# Add the cert-manager repository and perform a Helm-based installation
helm repo add jetstack https://charts.jetstack.io 
helm install cert-manager jetstack/cert-manager --version 'VERSION' -n cert-manager --create-namespace --set crds.enabled=true --wait

Airlock Microgateway CNI installation

Install the CNI DaemonSet and required RBAC (Role Based Access Control) manifests using our Helm charts.

The default values have been tested in our installation environments. However, some values may need to be adapted to meet the requirements of your setup environment. Path information for the CNI config files and binaries can either be found in the documentation of your Kubernetes distribution or CNI provider or queried with the following commands.

The cniNetDir, the directory of the CNI config files on the host, can be queried with:

copy
crictl info -o go-template --template '{{.config.cni.confDir}}'

The cniBinDir, the directory of the CNI plugin binaries on the host, can be queried with:

copy
crictl info -o go-template --template '{{.config.cni.binDir}}'
  1. Helm-based installation procedure:
  2. Adapt and run the following command with the current CNI Helm chart version.
  3. copy
    helm install airlock-microgateway-cni -n kube-system oci://quay.io/airlockcharts/microgateway-cni --version 4.3.0
  4. Wait for the Airlock Microgateway CNI DaemonSet to be up and running.
  5. copy
    kubectl -n kube-system rollout status daemonset -l app.kubernetes.io/instance=airlock-microgateway-cni
  6. Verify the correctness of the installation with helm test.
  7. copy
    helm upgrade airlock-microgateway-cni -n kube-system oci://quay.io/airlockcharts/microgateway-cni --set tests.enabled=true --reuse-values --version 4.3.0
  8. Check the log messages.
  9. copy
    helm test airlock-microgateway-cni -n kube-system --logs
  10. On successful installation, the logs should show the message Success. If the installation was not successful, go to Troubleshooting Microgateway CNI Helm test for troubleshooting.
  11. Disable the helm test deployment afterward.
  12. copy
    helm upgrade airlock-microgateway-cni -n kube-system  oci://quay.io/airlockcharts/microgateway-cni --set tests.enabled=false --reuse-values --version 4.3.0

Install the Airlock Microgateway Operator

In order to complete the Airlock Microgateway Operator installation and to run the below helm test successfully, you need to deploy a valid license. See article Configuration and monitoring of licenses for more information.

  1. Create the airlock-microgateway-system namespace
  2. copy
    kubectl create namespace airlock-microgateway-system
  3. Store the license in the Microgateway Operator namespace, in a Kubernetes secret with the name airlock-microgateway-license and the key microgateway-license.txt. Use the following command:
  4. copy
    kubectl -n airlock-microgateway-system create secret generic airlock-microgateway-license  
    --from-file=microgateway-license.txt=<my-local-microgateway-license.txt>
  5. Adapt and run the following command with the current Airlock Microgateway Operator Helm chart version. This will install airlock-microgateway in the airlock-microgateway-system namespace.
  6. copy
    helm install -n airlock-microgateway-system airlock-microgateway oci://quay.io/airlockcharts/microgateway --wait --version 4.3.0
  7. Verify that the Airlock Microgateway Operator started successfully:
  8. copy
    kubectl -n airlock-microgateway-system wait --for=condition=Available deployments --all --timeout=3m
  9. Verify the correctness of the installation with helm test.
  10. copy
    helm upgrade airlock-microgateway -n airlock-microgateway-system oci://quay.io/airlockcharts/microgateway --set tests.enabled=true --reuse-values --version 4.3.0
  11. Check the log messages.
  12. copy
    helm test airlock-microgateway -n airlock-microgateway-system --logs

    During installation, the installation status is echoed – i.e., the preliminary cleanup task and scaling the test installation to only 1 replica (to ensure no pods from previous runs are present).

  13. On successful installation, the logs should show the following message: ### Installation of 'airlock-microgateway' succeeded. If the installation was not successful, go to Troubleshooting Microgateway Operator Helm test for troubleshooting.
  14. Disable the helm test deployment afterward.
  15. copy
    helm upgrade airlock-microgateway -n airlock-microgateway-system oci://quay.io/airlockcharts/microgateway --set tests.enabled=false --reuse-values --version 4.3.0