Setup for running TrinoDB (formerly Prestosql) with Hive Metastore on Kubernetes as introduced in this blog post.
See previous blog post for more information about running Trino/Presto on FlashBlade.
-
Build Docker image for Hive Metastore
-
Deploy Hive Metastore: MariaDB (pvc and deployment), init-schemas, Metastore
-
Deploy Trino services (coordinator, workers, and cli)
-
Deploy Redash.
Assumptions: working Kubernetes deployment and S3 object store (e.g., FlashBlade).
Things you may need to modify:
- Docker repository name ($REPONAME) in build_image scripts and yaml files.
- DataVIP and access keys for FlashBlade (fs.s3a.endpoint and hive.s3a.endpoint)
- StorageClass for the MariaDB volume.
- Memory settings and worker counts.
Dockerfile for Metastore
Yaml for MariaDB
- Simple and not optimized.
Yaml for init-schemas
- One-time K8s job to initiate the MariaDB tables.
Yaml for Metastore service
Leverages the official Trino Docker image.
Yaml for Trino Coordinator/Workers
Trino CLI pod
Create SQL shell as:
kubectl exec -it pod/trino-cli -- trino --server trino:8080 --catalog hive --schema default