Get fine-grained Kubernetes + Infrastructure on AWS in 30 mins 🚀
$ brew install ansible jq terraform kops watch
$ pip install awscli
$ git clone [email protected]:1ambda/terraform-all-in-one.git
$ cd terraform-all-one
# Remove .gitigonre to index generated files
rm .gitignore
The key should have AdministratorAccess
permission.
$ export AWS_ACCESS_KEY_ID={VALUE} AWS_SECRET_ACCESS_KEY={VALUE}
# Modify values for `COMPANY`,`PROJECT`, and `EMAIL`
$ COMPANY=github PROJECT=1ambda [email protected] ./create-ssh-key.sh
company and project variable should match with values used for the generated ssh key.
-
root-infra: Create VPC, Bastion, ECS, Stroages and build kops scripts
cd root-infra; # build infra using terraform terraform init terraform apply -var 'rds_username={USERNAME}' -var 'rds_password={PASSWORD}' # provision non-managed stroages using ansible ../script-provision/generated.provision-zookeeper.sh
-
root-kubernetes: Build Kubernetes Cluster and install add-ons
cd root-kubernetes; # generate kops files $(cat generated.kops-env.sh); ./generated.kops-create.sh; # build kubernetes cluster terraform init terraform apply # wait for few minitues until Kube API ELB is ready (`api-kops-*`) # then validate the created cluster kops export kubecfg --name=$NAME ./generated.correct-kubectl-context.sh # wait for 3-5 mins until kubernetes cluster is ready kops validate cluster kubectl get pods
- VPC
- Basiton Host
- ECS
- Managed Storages: RDS (MariaDB), Elasticsearch, Elasticache (Redis)
- Barematal Storages: Zookeeper
- Kubernetes Cluster (Single Master)
- Terraform Intergrated Kubernetes Cluster Creation using kops
- Cloudwatch Log Groups for Kube AWSLOGS
- Dynamic Cloudwatch Alarm Registration for ASG Event
- Cloudwatch Custom Metrics + Alerts for EC2: Memory, Disk Space
- add-on: Nginx Ingerss Chart with AWS ACM
- add-on: Kubernetes Dashboard
- add-on: Elasticsearch, Kibana, Fluentd