Tool to setup a new EKS cluster and connect to Codefresh
Please see blog post with full instructions here: https://codefresh.io/kubernetes-tutorial/getting-started-amazon-eks/
Would you like more configuration options? Please open a GitHub issue or fork this repo and submit a pull request!
Codefresh pipelines can be found in the .codefresh/
directory.
The following environment variables are required:
AWS_ACCESS_KEY_ID
encrypted - AWS access key IDAWS_SECRET_ACCESS_KEY
encrypted - AWS secret access keyCLUSTER_NAME
- unique EKS cluster name
The following environment variables are optional:
CLUSTER_SIZE
- number of nodes in ASG (default: 1)CLUSTER_REGION
- AWS region to deploy to (default: us-west-2)CLUSTER_INSTANCE_TYPE
- EC2 instance type (default: m4.large)CLUSTER_KEY_NAME
- The key name to use for SSH access (default: None)
View YAML: .codefresh/setup.yml
Does the following:
- Bootstraps an EKS cluster and VPC in your AWS account using Terraform
- Saves the Terraform statefile in a Codefresh context
- Creates some base Kubernetes resources
- Initializes Helm in the cluster
- Adds the cluster to your Codefresh account
View YAML: .codefresh/teardown.yml
Does the following:
- Loads the Terraform statefile from Codefresh context
- Destroys the EKS cluster from your AWS account using Terraform
- Removes the cluster from your Codefresh account
EKS User Guide: https://docs.aws.amazon.com/eks/latest/userguide/
Bootstrapping EKS cluster with Terraform: https://www.terraform.io/docs/providers/aws/guides/eks-getting-started.html
Heptio Authenticator for AWS: https://github.com/heptio/authenticator
The contents of terraform/
directory based on the official Terraform EKS example found here: https://github.com/terraform-providers/terraform-provider-aws/tree/master/examples/eks-getting-started