Adhesive, an open-source replacement for AWS Glue on Kubernetes
Rebuilds Glue's ETL jobs, workflows, catalog, CDC and data quality from open-source parts on EKS, loads MySQL and Postgres into Snowflake, and comes up or tears down to zero spend with one command.
- Role
- Personal project
- Year
- 2026
- Stack
- Amazon EKS
- Terraform
- Karpenter
- Spark
- Iceberg
- Airflow
- Kafka
- Debezium
- Snowflake
- dbt
- OpenMetadata
- Prometheus
- Grafana
- Python
- Links
- Source code
Problem
AWS Glue is convenient, but it is a black box with per-DPU pricing and limited control. I wanted to know what it takes to build the same capabilities from open components, in a way that is reproducible, observable and cheap enough for a personal budget.
Constraints
- Everything is code. Four Terraform stages plus Helm values, with no console clicking.
- One ALB fronts every UI, with path-based routing.
- No static credentials. EKS Pod Identity for AWS access, External Secrets Operator for secrets, and key-pair authentication for Snowflake.
- Cost-disciplined. The target is under about $1 an hour while running and nothing after teardown, with a script that audits for leftovers.
- Small account quotas. 16 on-demand vCPUs and 32 spot vCPUs, on free-tier-eligible instance types (
m7i-flex.large,c7i-flex.large).
Approach
Each Glue capability maps to an open-source component:
| AWS Glue capability | Adhesive component |
|---|---|
| ETL jobs | Spark 3.5 on the Kubeflow Spark Operator |
| Workflows and triggers | Airflow 3 with the KubernetesExecutor |
| Data Catalog | Hive Metastore with Iceberg tables on S3 |
| Crawlers and lineage | OpenMetadata, with ingestion run as Airflow tasks |
| Streaming and CDC | Debezium on Strimzi Kafka Connect, with the Snowflake Kafka Connector sink |
| Job bookmarks | A watermark table in Iceberg, with incremental reads |
| Data Quality | Great Expectations, run as Airflow tasks |
| CloudWatch | Prometheus, Alertmanager, Grafana, and Fluent Bit with Elasticsearch and Kibana |
Batch. The Airflow DAG batch_mysql_pg_to_snowflake has Spark read MySQL and Postgres over JDBC incrementally, merge the data into Iceberg bronze tables on S3, and load them into Snowflake RAW. Great Expectations then validates the load, dbt builds the ANALYTICS models including the fct_orders mart, and OpenMetadata refreshes the catalog and lineage.
CDC. A data generator writes to MySQL and Postgres. Debezium captures the changes into Kafka topics, and the Snowflake Kafka Connector sinks them into GLUE_POC.CDC.*. A cdc_health DAG checks that every connector and task is RUNNING.
Key decisions and trade-offs
- The ALB belongs to Terraform, not to an Ingress. Target groups and listener rules are Terraform resources, and services attach through the AWS Load Balancer Controller's
TargetGroupBinding. The ALB hostname is then known at plan time, so each UI's base URL is set with no second apply, andterraform destroyremoves the ALB cleanly instead of leaving a controller-created load balancer that blocks VPC deletion. The cost is that routing lives in Terraform, so adding a UI means editing it. - Staged Terraform. Four stages, from
00-bootstrapto04-snowflake, keep the Helm and Kubernetes providers from depending on a cluster that does not exist yet. The cost is an ordered apply and destroy, whichup.shandteardown.shhandle. - Karpenter, spot first. A small on-demand node group runs the controllers. Everything else runs on Karpenter nodes, spot first with on-demand fallback, and a tainted spot pool runs Spark executors. Pool limits cap the worst-case spend (12 nodes in the general pool at most), and empty or underused nodes consolidate after 1 minute. The cost is that spot nodes can be reclaimed, which the on-demand fallback covers for the general pool.
- Secrets without static keys. Terraform generates passwords into AWS Secrets Manager and External Secrets Operator syncs them into the cluster. The Snowflake service user authenticates with an RSA key pair.
- Observability ships as code. Grafana dashboards (cluster and Karpenter, CNPG, Elasticsearch, Kafka), Prometheus alert rules and Kibana saved searches are all in the repository.
Results
- A cold
up.sh, the smoke test and a full teardown have run end to end, andcost-check.shreported nothing billable afterward. - The smoke test checks every ALB path and target group, the Debezium connectors, a Spark job and Snowflake.
- The seed data is 5,000 customers, 500 products and 20,000 orders in MySQL, with payments, shipments and inventory derived in Postgres.
- Estimated running cost is about $0.55–0.70 an hour in
ap-south-1. This is a planning figure, not a measured bill.
Not in scope
This is a proof of concept. It leaves out HTTPS and custom domains, SSO for the UIs, multi-AZ high availability and backups for stateful services, and CI/CD.
What I would do next
- Add HTTPS through ACM and a custom domain, and put SSO in front of the UIs.
- Add a CI pipeline for
terraform validate, image builds and DAG tests. - Add backups and multi-AZ replicas for the stateful services.