This repository contains simplified CloudFormation templates for deploying a demo EKS environment with supporting infrastructure.
The demo environment consists of:
- VPC - A simple VPC with one public and one private subnet in a single AZ
- IAM - Minimal IAM roles required for EKS and ClickHouse
- RDS - A small PostgreSQL database for application data
- ClickHouse - A ClickHouse database on EC2 for analytics (accessible only from EKS)
- EKS - A basic EKS cluster with a single node
- AWS CLI installed and configured with appropriate permissions
- kubectl installed (for interacting with the EKS cluster)
- AWS account with permissions to create the required resources
To deploy the entire demo environment:
make -f Makefile-simple deploy-demo PROFILE=your-aws-profile STACK_NAME=your-stack-nameThis will:
- Validate all templates
- Deploy the VPC
- Deploy IAM roles
- Deploy the RDS database
- Deploy the ClickHouse instance
- Deploy the EKS cluster
- Configure kubectl to connect to your cluster
To delete all resources:
make -f Makefile-simple destroy-demo PROFILE=your-aws-profile STACK_NAME=your-stack-nameCheck the status of all stacks:
make -f Makefile-simple status PROFILE=your-aws-profile STACK_NAME=your-stack-nameUpdate your kubeconfig to connect to the cluster:
make -f Makefile-simple update-kubeconfig PROFILE=your-aws-profile STACK_NAME=your-stack-nameGet the database password:
make -f Makefile-simple get-db-password PROFILE=your-aws-profile STACK_NAME=your-stack-nameGet the ClickHouse password:
make -f Makefile-simple get-clickhouse-password PROFILE=your-aws-profile STACK_NAME=your-stack-nameClickHouse is deployed in the private subnet and is only accessible from the EKS cluster. To connect to ClickHouse from your applications running in EKS, use:
- HTTP endpoint: http://:8123
- Client endpoint: :9000
The private IP address is available in the CloudFormation outputs:
aws --profile your-aws-profile cloudformation describe-stacks --stack-name your-stack-name-ch --query "Stacks[0].Outputs[?OutputKey=='ClickHousePrivateIP'].OutputValue" --output textTo access ClickHouse for testing or administration, you can:
- Create a pod in the EKS cluster with the ClickHouse client
- Use kubectl port-forwarding to access the ClickHouse interface
- Set up a bastion host or AWS Systems Manager Session Manager for direct access
This demo environment has been simplified in several ways:
- Single Availability Zone - Production would use multiple AZs for high availability
- Minimal Monitoring - Production would include CloudWatch dashboards and alarms
- Smaller Instances - Production would use appropriately sized instances
- No Multi-AZ for RDS - Production would enable Multi-AZ for database high availability
- Simplified ClickHouse - Reduced storage and no monitoring
- Simplified Security - Some security measures are relaxed for demo purposes
- Single Node EKS - Production would have multiple nodes across AZs
After deploying the demo environment, you can:
- Deploy sample applications to the EKS cluster
- Connect applications to the RDS database
- Use ClickHouse for analytics workloads from your EKS applications
- Explore the AWS Console to see the created resources
- Experiment with scaling the node group
This demo environment is not suitable for production use. It has been simplified for demonstration and learning purposes.