{"id":28567020,"url":"https://github.com/altinity/terraform-aws-eks-clickhouse","last_synced_at":"2025-09-13T08:38:15.814Z","repository":{"id":219663239,"uuid":"741124806","full_name":"Altinity/terraform-aws-eks-clickhouse","owner":"Altinity","description":"Terraform module for creating EKS clusters optimized for ClickHouse with EBS and autoscaling ☁️","archived":false,"fork":false,"pushed_at":"2025-07-08T11:49:58.000Z","size":884,"stargazers_count":21,"open_issues_count":2,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-08T12:57:42.246Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/Altinity/eks-clickhouse/aws","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Altinity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-09T18:42:15.000Z","updated_at":"2025-07-08T11:50:02.000Z","dependencies_parsed_at":"2024-05-20T16:13:28.565Z","dependency_job_id":"f53622c9-4b02-414e-b98e-ddb2758c6a58","html_url":"https://github.com/Altinity/terraform-aws-eks-clickhouse","commit_stats":null,"previous_names":["altinity/terraform-eks-clickhouse","altinity/terraform-aws-eks-clickhouse"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/Altinity/terraform-aws-eks-clickhouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altinity%2Fterraform-aws-eks-clickhouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altinity%2Fterraform-aws-eks-clickhouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altinity%2Fterraform-aws-eks-clickhouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altinity%2Fterraform-aws-eks-clickhouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Altinity","download_url":"https://codeload.github.com/Altinity/terraform-aws-eks-clickhouse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altinity%2Fterraform-aws-eks-clickhouse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274940277,"owners_count":25378000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-10T15:40:25.328Z","updated_at":"2025-09-13T08:38:15.804Z","avatar_url":"https://github.com/Altinity.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-aws-eks-clickhouse\n\n[![License](http://img.shields.io/:license-apache%202.0-brightgreen.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n[![issues](https://img.shields.io/github/issues/altinity/terraform-aws-eks-clickhouse.svg)](https://github.com/altinity/terraform-aws-eks-clickhouse/issues)\n\u003ca href=\"https://join.slack.com/t/altinitydbworkspace/shared_invite/zt-w6mpotc1-fTz9oYp0VM719DNye9UvrQ\"\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?logo=slack\u0026logoColor=959DA5\u0026label=Slack\u0026labelColor=333a41\u0026message=join%20conversation\u0026color=3AC358\" alt=\"AltinityDB Slack\" /\u003e\n\u003c/a\u003e\n\nTerraform module for creating EKS clusters optimized for ClickHouse® with EBS and autoscaling.\nIt includes the Altinity Kubernetes Operator for ClickHouse and a fully working ClickHouse cluster.\n\n## Prerequisites\n\n- [terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) (recommended `\u003e= v1.5`)\n- [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)\n- [aws-cli](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)\n\n## Usage\n###  Compatibility Notice\n⚠️ This module is not yet compatible with the latest versions of the following providers:\n  - AWS Provider v6.x.x\n  - Helm Provider v3.x.x\n\nPlease use supported versions until compatibility updates are released. Contributions are welcome 🙌\n\n\n### Create an EKS Cluster with the Altinity Kubernetes Operator for ClickHouse and ClickHouse Cluster\n\nPaste the following Terraform sample module into a tf file (`main.tf`) in a new directory. Adjust properties as desired.\nThe sample module will create a Node Pool for each combination of instance type and subnet. For example, if you have 3 subnets and 2 instance types, this module will create 6 different Node Pools.\n\n```hcl\nterraform {\n  required_providers {\n    aws = {\n      source  = \"hashicorp/aws\"\n      version = \"~\u003e 5.40\"\n    }\n    helm = {\n      source  = \"hashicorp/helm\"\n      version = \"~\u003e 2.12\"\n    }\n  }\n}\n\nlocals {\n  region = \"us-east-1\"\n}\n\nprovider \"aws\" {\n  # https://registry.terraform.io/providers/hashicorp/aws/latest/docs\n  region = local.region\n}\n\nmodule \"eks_clickhouse\" {\n  source  = \"github.com/Altinity/terraform-aws-eks-clickhouse\"\n\n  install_clickhouse_operator = true\n  install_clickhouse_cluster  = true\n\n  # Set to true if you want to use a public load balancer (and expose ports to the public Internet)\n  clickhouse_cluster_enable_loadbalancer = false\n\n  eks_cluster_name = \"clickhouse-cluster\"\n  eks_region       = local.region\n  eks_cidr         = \"10.0.0.0/16\"\n\n  eks_availability_zones = [\n    \"${local.region}a\",\n    \"${local.region}b\",\n    \"${local.region}c\"\n  ]\n  eks_private_cidr = [\n    \"10.0.1.0/24\",\n    \"10.0.2.0/24\",\n    \"10.0.3.0/24\"\n  ]\n  eks_public_cidr = [\n    \"10.0.101.0/24\",\n    \"10.0.102.0/24\",\n    \"10.0.103.0/24\"\n  ]\n\n  eks_node_pools = [\n    {\n      name          = \"clickhouse\"\n      instance_type = \"m6i.large\"\n      desired_size  = 0\n      max_size      = 10\n      min_size      = 0\n      zones         = [\"${local.region}a\", \"${local.region}b\", \"${local.region}c\"]\n    },\n    {\n      name          = \"system\"\n      instance_type = \"t3.large\"\n      desired_size  = 1\n      max_size      = 10\n      min_size      = 0\n      zones         = [\"${local.region}a\"]\n    }\n  ]\n\n  eks_tags = {\n    CreatedBy = \"mr-robot\"\n  }\n}\n```\n\n\u003e ⚠️ The instance type of `eks_node_pools` at index `0` will be used for setting up the clickhouse cluster replicas.\n\n### Run Terraform to create the cluster\n\nExecute commands to initialize and apply the Terraform module. It will create an EKS cluster and install a ClickHouse sample database.\n\n```sh\nterraform init\nterraform apply\n```\n\n\u003e Setting up the EKS cluster and sample database takes from 10 to 30 minutes depending on the load in your cluster and availability of resources.\n\n### Access your ClickHouse database\nUpdate your kubeconfig with the credentials of your new EKS Kubernetes cluster.\n```sh\naws eks update-kubeconfig --region us-east-1 --name clickhouse-cluster\n```\n\nConnect to your ClickHouse server using `kubectl exec`.\n```sh\nkubectl exec -it chi-eks-dev-0-0-0 -n clickhouse -- clickhouse-client\n```\n\n### Run Terraform to remove the cluster\nAfter use you can destroy the EKS cluster. First, delete any ClickHouse clusters you have created.\n```sh\nkubectl delete chi --all --all-namespaces\n```\n\nThen, run `terraform destroy` to remove the EKS cluster and any cloud resources.\n```sh\nterraform destroy\n```\n\n## Docs\n- [Terraform Registry](https://registry.terraform.io/modules/Altinity/eks-clickhouse/aws/latest)\n- [Architecture](https://github.com/Altinity/terraform-aws-eks-clickhouse/tree/master/docs)\n\n## Issues\nIf a terraform operation does not complete, try running it again. If the problem persists, please [file an issue](https://github.com/Altinity/terraform-aws-eks-clickhouse/issues).\n\n## More Information and Commercial Support\nAltinity is the maintainer of this project. Altinity offers a range of\nservices related to ClickHouse and analytic applications on Kubernetes.\n\n- [Official website](https://altinity.com/) - Get a high level overview of Altinity and our offerings.\n- [Altinity.Cloud](https://altinity.com/cloud-database/) - Run ClickHouse in our cloud or yours.\n- [Altinity Support](https://altinity.com/support/) - Get Enterprise-class support for ClickHouse.\n- [Slack](https://altinitydbworkspace.slack.com/join/shared_invite/zt-w6mpotc1-fTz9oYp0VM719DNye9UvrQ) - Talk directly with ClickHouse users and Altinity devs.\n- [Contact us](https://hubs.la/Q020sH3Z0) - Contact Altinity with your questions or issues.\n\n## Legal\nAll code, unless specified otherwise, is licensed under the [Apache-2.0](LICENSE) license.\nCopyright (c) 2024 Altinity, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltinity%2Fterraform-aws-eks-clickhouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faltinity%2Fterraform-aws-eks-clickhouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltinity%2Fterraform-aws-eks-clickhouse/lists"}