A Pulumi project that deploys a Trino cluster on Kubernetes using the official Trino Helm chart, with an OpenTelemetry Collector for observability.
Supports two deployment targets via Go build tags:
- EKS (default) -- provisions a VPC and EKS cluster on AWS, exposes Trino via LoadBalancer
- Minikube -- uses a local minikube cluster with resource-constrained settings
- Trino (Helm chart v1.42.0) -- coordinator (and workers on EKS)
- OpenTelemetry Collector (contrib image) -- receives:
- Metrics -- scrapes Trino's native
/metricsendpoint via Prometheus receiver - Logs -- receives Trino's structured JSON logs via TCP
- Traces -- receives Trino's OpenTelemetry traces via OTLP gRPC
- Metrics -- scrapes Trino's native
For EKS:
- AWS credentials configured in your environment
For Minikube:
- minikube installed and running
- Login to Pulumi
- Deploy from the
stack/directory:cd stack pulumi up
Alternatively, use the Automation API entrypoint at the repo root to deploy remotely via Pulumi Deployments (update main.go to point to your organization first):
go run main.go
To destroy the stack:
cd stack
pulumi destroy
-
Start minikube:
minikube start --cpus=2 --memory=4096 -
Deploy with the
minikubebuild tag:cd stack GOFLAGS="-tags=minikube" pulumi login --local GOFLAGS="-tags=minikube" pulumi stack init dev GOFLAGS="-tags=minikube" pulumi up --yesThe minikube build reads your local kubeconfig (
~/.kube/configby default) and configures Trino with reduced resource limits (512M coordinator heap, no workers) to fit within a 4GB minikube VM. -
Verify Trino is running:
SVC_NAME=$(kubectl get svc -l app.kubernetes.io/name=trino -o jsonpath='{.items[0].metadata.name}') kubectl port-forward "svc/$SVC_NAME" 8080:8080 & curl http://localhost:8080/v1/info
To destroy:
GOFLAGS="-tags=minikube" pulumi destroy --yes
stack/
main.go -- entrypoint, calls deploy()
stack.go -- orchestration: creates cluster, deploys OTel collector and Trino
observability.go -- OpenTelemetry Collector Helm release and configuration
eks.go -- EKS cluster provisioning and Helm values (build tag: !minikube)
minikube.go -- local kubeconfig reader and Helm values (build tag: minikube)
Pulumi.yaml -- Pulumi project definition
main.go -- Automation API entrypoint for remote EKS deployment
A GitHub Actions workflow (.github/workflows/test-minikube.yml) runs on pushes and PRs to main. It deploys to minikube and verifies that Trino's /v1/info endpoint returns a 2xx response and the OTel collector is running.