Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

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)
  • kubectl configured 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 pods

Key Variables

VariableTypeDefaultDescription
compute_enginestringeksMust be eks for this example
indexer_clickhouse_urlstring-ClickHouse HTTP endpoint (sensitive)
indexer_clickhouse_userstringdefaultClickHouse username
indexer_clickhouse_passwordstring-ClickHouse password (sensitive)
indexer_clickhouse_dbstringdefaultClickHouse database name
network_enable_nat_gatewaybooltrueRequired 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
Consider alternatives when:
  • 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.