Kubernetes Deployment

This page describes how to deploy KX Dashboards on Kubernetes.

A Helm chart has been provided for deploying KX Dashboards to a Kubernetes cluster.

Prerequisites

To run within Kubernetes there are a number of pre-requisites:

  • helm must be installed

  • kubectl must be installed

  • Valid KX license (kdb+ or Insights SDK, depending on target environment). You need the source path to your license for this step.

Deploy using Kubernetes quick start

To deploy KX Dashboards, complete the following steps:

  1. Create a k8s secret for the kdb license

  2. Generate a KX Downloads Portal bearer token

  3. Add a Helm Chart repository

  4. Create a k8s Secret for repo authentication

  5. Configure a Helm chart file

  6. Install KX Dashboards

  7. Access KX Dashboards

Create a k8s secret for the KX license

A valid license is required. The type of license you need depends on whether you are going to integrate KX Dashboards with kdb+ or kdb Insights SDK.

bash

Copy
kubectl create secret generic kxi-license --from-file=license=path/to/*.lic                  

Generate a KX Downloads Portal bearer token

The following steps explain how to obtain the KX Downloads Portal credentials required to login to the KX Downloads Portal to download the necessary images:

  1. Navigate to the KX Downloads Portal.

  2. Click Login and enter your email address and click Sign In.

  3. Check your email for a message from noreply@kx.com to complete your login to https://portal.dl.kx.com. You can either:

    • Click the Login link provided in the email, or
    • Copy the verification code from the email and paste it into the login page.
  4. Once you are logged in, navigate to Token Management, https://portal.dl.kx.com/auth/token.

  5. Click Add New Token.

  6. Copy and securely save the Bearer token, it is only shown once.

Information

If you have completed the trial download process on the KX website, use the bearer token provided in your email.

If you do not have credentials to access the KX Downloads Portal , please contact sales@kx.com

This bearer token is used in the next step to provide credentials when adding the Helm rep.

Add a Helm Chart repository

In this step you add a Helm chart repository to enable you to access to the official charts needed to deploy, configure, and manage KX Dashboards consistently across environments.

  1. Enter the following command

    bash

    Copy
    helm repo add kxi-repo https://portal.dl.kx.com/assets/helm --username <username> --password <password> 

                        

    The following output is displayed, "kxi-repo" has been added to your repositories.

  2. Update your Helm local cache:

    bash

    Copy
    helm repo update

    The following output is displayed Hang tight while we grab the latest from your chart repositories...

    ...Successfully got an update from the "kx-insights-kxidev" chart repository

    Update Complete. ⎈Happy Helming!⎈

Create k8s secret for repo authentication

In this step you create a k8s secret and add it to your Kubernetes cluster. The Kubernetes secret is used to securely store sensitive data (like passwords, keys, or certificates). This lets your pods use them at runtime without exposing values directly in configs.

bash

Copy
kubectl create secret docker-registry kx-repo-access --docker-username=<username> --docker-password=<password> --docker-server=portal.dl.kx.com

 

 

The following output is displayed, secret/kx-repo-access created.

Configure a Helm Chart file

The configuration file specifies the license and repo access secret defined above. This file enables a LoadBalancer, which assigns an IP address so that KX Dashboards can be accessed externally.

Note

If you only want local access you can remove LoadBalancing by deleting service.type: LoadBalancer lines from the .yaml configuration below. In this case, to access KX Dashboards you must use port forwarding for local access; see Accessing the Dashboards Locally

  1. Copy the following configuration file and save it as dash-web-devval.yaml.

    yaml

    Copy
    dash-web-devval.yaml
    global:
      image:
        repository: portal.dl.kx.com/
      imagePullSecrets:
        - name: kx-repo-access
      license:
        secretName: kxi-license
        #onDemand=true  # uncomment to use kc.lic
        #type: "k4"     # uncomment to use k4.lic
        asFile: true
    # for port forwarding icto-
      encryption:
        enabled: false
    # set LoadBalancer for all components if required
    service:
      type: LoadBalancer

    # Set 
    # dash-web:
    #   service:
    #     type: LoadBalancer

                        

Install KX Dashboards

Use the Helm repo that was added above to install the dash-web client into your Kubernetes cluster.

bash

Copy
$ helm install dash kxi-repo/dash-web --version="{version}" -f path/to/dash-web-devval.yaml

Access KX Dashboards

Accessing Dashboards is possible using the EXTERNAL-IP address and port 8080, separated by a colon; that is EXTERNAL-IP:8080

To get the IP address use Kubernetes command:

bash

Copy
kubectl get services/dash-web
                    

Output includes the Name, Type, Cluster-IP, External-IP and Port information.

Accessing KX Dashboards locally

To access Dashboards locally, use port forwarding of the pod running KX Dashboards.

  1. Get the pod names by running this command to return a list of services.

    bash

    Copy
    kubectl get svc                   
  2. To expose the service port, run the port-forward command using the [deployment]-dash-web service name.

    bash

    Copy
    kubectl port-forward svc/dash-dash-web 9090:8080                   
  3. Navigate to http://localhost:9090to Open KX Dashboards.

Install from local source code

You can deploy KX Dashboards (dash-web) into your Kubernetes cluster using a local copy of the Helm chart instead of pulling it from a remote repository by running the following command. This may be required for testing or in air-gapped environments.

bash

Copy
helm install dash ./helm/dash-web -f dash-web-devval.yaml                 

Next Steps