EKS + ClickHouse (BYODB)
Production-grade Kubernetes deployment on AWS EKS. Runs eRPC and rindexer as Kubernetes pods with your own external ClickHouse database. Best for teams already using Kubernetes.
Architecture
┌────────────────── AWS VPC ──────────────────┐
│ │
│ EKS Cluster (managed control plane) │
│ ├── eRPC pod (RPC proxy) │
│ └── rindexer pod (indexer) │
│ └── writes to ────────────────────────────→ ClickHouse (external)
│ │
│ K8s Secrets (CH creds, RPC URL) │
│ ECS cluster (service orchestration) │
└──────────────────────────────────────────────┘What Gets Deployed
- VPC with public/private subnets, NAT Gateway, security groups
- EKS cluster with managed control plane (~$73/mo)
- ECS cluster for service orchestration
- eRPC deployment -- RPC proxy with failover and caching
- rindexer deployment -- EVM event indexer
- Kubernetes Secrets for ClickHouse credentials
- ConfigMap volume mounts for erpc.yaml, rindexer.yaml, and ABIs
- IAM roles for EKS service accounts
Prerequisites
- Terraform >= 1.5.0
- AWS CLI v2 with configured credentials (EC2, VPC, IAM, EKS, Secrets Manager)
kubectlconfigured for EKS access- A ClickHouse instance (ClickHouse Cloud or self-hosted)
Quick Start
git clone https://github.com/ExoMonk/evm-cloud.git
cd evm-cloud/examples/aws_eks_BYO_clickhouse
cp secrets.auto.tfvars.example secrets.auto.tfvars
# Edit secrets.auto.tfvars:
# indexer_clickhouse_url = "https://your-instance.clickhouse.cloud:8443"
# indexer_clickhouse_password = "your-password"
terraform init
terraform plan
terraform apply
# Configure kubectl
aws eks update-kubeconfig --name <cluster-name> --region us-east-1
kubectl get podsKey Variables
| Variable | Type | Default | Description |
|---|---|---|---|
compute_engine | string | eks | Must be eks for this example |
indexer_clickhouse_url | string | - | ClickHouse HTTP endpoint (sensitive) |
indexer_clickhouse_user | string | default | ClickHouse username |
indexer_clickhouse_password | string | - | ClickHouse password (sensitive) |
indexer_clickhouse_db | string | default | ClickHouse database name |
network_enable_nat_gateway | bool | true | Required for private subnet egress |
When to Use This
Choose this example when:- You want production-grade Kubernetes with managed control plane
- Your team already operates EKS clusters
- You need pod autoscaling, rolling deployments, and health checks
- You are comfortable with the ~$73/mo EKS control plane cost
- You want Kubernetes without the EKS fee -- use k3s (~$35-50/mo)
- You want the simplest setup -- use EC2 + Docker Compose
- You want to manage workload deployment separately -- see external EKS
See examples/aws_eks_BYO_clickhouse for complete details.