Skip to content

Setup for running Trino with Hive Metastore on Kubernetes

Notifications You must be signed in to change notification settings

nuclearwu/trino-on-k8s

 
 

Repository files navigation

trino-on-k8s

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.

How to Use

  1. Build Docker image for Hive Metastore

  2. Deploy Hive Metastore: MariaDB (pvc and deployment), init-schemas, Metastore

  3. Deploy Trino services (coordinator, workers, and cli)

  4. 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.

Hive Metastore Service

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

Trino Coordinator/Workers/CLI

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

About

Setup for running Trino with Hive Metastore on Kubernetes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 80.2%
  • Shell 19.8%