september 27, 2024
Installing Apache SuperSet in a Kubernetes cluster on Windows OS
Kubernetes is a container orchestration platform designed for deploying and managing application containers. A Kubernetes cluster (or K8s) addresses scaling, running containers across multiple hosts, and load balancing.
In our example, we will use a local single-node Kubernetes cluster based on Minikube.
Preparation
To successfully deploy SuperSet in a Kubernetes cluster, we will need the following:
1. Following the steps from the article Installing Apache SuperSet using Docker on Windows OS (sections 1–3), enable hypervisor support, install WSL2, Ubuntu, and Docker Desktop.
2. Install the Kubernetes command-line tool kubectl:
3. Download and install Minikube for Windows.
4. Install the Helm package manager:
Alternatively, you can manually install the required packages without using the WinGet package manager. If you choose manual installation, you will need to manually add them to the PATH environment variables to access them from the command line.
Deployment
1. You need to start the local Kubernetes cluster by entering the following command in the command line:
The process of downloading the image and setting up the cluster will begin. Once complete, check the status using the command:
A properly installed and running cluster will display the following status:
2. To monitor the cluster’s state, deployments, and resource management, you should launch the Kubernetes Dashboard web interface. To do this, enter the following command in the command line:
This will start a local web server, and once launched, it will open the Kubernetes dashboard in your browser.
3. Add the Apache Superset repository to the Helm package manager:
4. After adding the Superset repository to Helm, you can initiate the installation and launch of the Superset container with the following command:
Where values.yaml is the chart file with customisable installation/update parameters for Helm, and the template is available via the provided link.
4.1. Before running the installation, you need to specify the SECRET_KEY in the file:
4.2. Add the required package dependencies from PyPI to support database connections:
List of supported databases:
Connecting to Databases
To explore the product, you can launch Superset in test mode with a preloaded demo database and dashboards. To do this, add the appropriate parameter to the config:
Additionally, in the init section of the values.yaml file, you must specify the admin login and password for authentication in Superset:
After installing and launching Superset, you can monitor the status of your deployments and their pods in the Kubernetes dashboard.
At this stage, the deployment of the Superset container in the Kubernetes cluster is complete.
To access the Superset web server, you need to set up a tunnel between your local machine and the Kubernetes cluster instance:
After that, the Superset web interface will be accessible at http://127.0.0.1:8088.