In this blog, we will learn to deploy & set up Apache Superset with PostgreSQL instance. Apache Superset is an open-source software application for data exploration and data visualization able to handle data at a petabyte scale.
Prerequisites
- A Postgresql Instance deployed on the same Kubernetes cluster
- Helm installed in system & basic knowledge of Helm.
- Admin username & password of PostgreSQL instance
- Superset Database created in PostgreSQL (If not then follow step 2)
- Optionally Cert-manager if you want to have SSL certificates on hostnames.
Before You Begin
Clone the repo for scripts & code then change the directory to the cloned repo.
git clone https://github.com/knoldus/deploy-apache-superset.git
cd deploy-apache-superset
Steps to deploy
1. Create or Edit apache-superset/custom-values.yaml file
Replace placeholders with username, password and service name.
supersetNode:
connections:
## Changes to service name of your postgresql instance
db_host: <POSTGRES_SERVICE_NAME>.<NAMESPACE>.svc.cluster.local
db_port: "5432"
## change the <USERNAME> with admin username of postgres
db_user: <USERNAME>
## change the <PASSWORD> with admin username of postgres
db_pass: <PASSWORD>
2. Create database in postgresql (If not created)
kubectl port-forward service/<SERVICE_NAME_OF_POSTGRES> 5432
createdb -h 127.0.0.1 -p 5432 -U <USERNAME> superset
3. Add ingress configs values
In Values.ingress add values
ingress:
enabled: true
ingressClassName: nginx
path: /
pathType: ImplementationSpecific
hosts:
- <YOUR_HOST_NAME>
tls:
- secretName: <SECRET_NAME_OF_CERT_KEYS>
hosts:
- <YOUR_HOST_NAME>
3. Deploy Apache superset
helm upgrade --install superset apache-superset -f apache-superset/custom-values.yaml --namespace superset --create-namespace
Conclusion
This is how we can deploy Apache Superset with an already existing PostgreSQL instance.
For more interesting blogs checkout Knoldus blogs site