exec to one of the redash containers and run
bin/run ./manage.py db upgrade
If you arrived here, you probably know what Redash is.
If not, you're more than welcome to get yourself familiar with it.
- A working K8s cluster
- kubectl configured to work against your cluster
- A crypted htpasswd string for the web interface's basic auth
- A Docker repository you are able to push and pull images from
- A PostgreSQL database URL with the redash database (not schema, only database) already created.
-
Clone this repository:
git clone --recursive git@github.com:nanit/redash-kubernetes.git
-
Run the deployment task from the makefile:
DOCKER_REPO=my_company_docker_repo \
REDASH_DATABASE_URL=postgres://redash-user@postgres/redash-db \
REDASH_NAME=my-redash \
REDASH_HOST=my-redash.my-company.com \
REDASH_MAIL_SERVER=my.smtp.com \
REDASH_MAIL_PORT=587 \
REDASH_MAIL_USERNAME=smtp-user \
REDASH_MAIL_PASSWORD=smtp-password \
REDASH_MAIL_DEFAULT_SENDER=my-redash@my-company.com
make deploy
- When the redash pod is ready run create_db in order to create the DB schema:
List your redash pods: kubectl get pods -l app=redash
Then run the command on the pod:
kubectl exec redash-3940390882-13xgl -c redash-web -- /app/bin/docker-entrypoint create_db
Just replace redash-3940390882-13xgl
with your actual pod name
- Get the ELB hostname which is serving Redash:
kubectl get service redash -o jsonpath="{.status.loadBalancer.ingress[0].hostname}"
- Put it into the browser and set up the initial user.
That's it, you're in.