Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 1.55 KB

README.md

File metadata and controls

47 lines (29 loc) · 1.55 KB

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