Poke is infrastructure as software to provision EKS cluster in an opinianated way. Code is written in nodejs utilising pulumi framework. It is opinionated in such a way to improve security and simplicity.Consider this similar to terraform module. This package can be used to provision eks clusters declaratively with immutability and repeatability.
Please note thi is a MVP and code quality isn't that great. But the good thing is it works. I should probably make some code optimisations going forward. I welcome PRs to make improvements.
It has following capabilities
- Has the ability to create multiple clusters with multiple worker node groups with a mix of Linux and windows nodes.
- Control plane API is private
- Subnets are private
- Default Dashboard is disabled
- Autoscalling of worker groups is enabled
- Nodes in worker group have private ip addresses only
- Default node group is skiped
- Uses spot instances for worker nodes
- Has the ability to attach existing security groups to worker nodes.
- Has the ability to provision both Linux and Windows worker groups
- Pre existing VPC and subnets are used
- Uses bottlerocket linux distribution for enhanced security of worker nodes
Some of the config options can be set as per your requirements in pulumi.dev.yaml file. Pulumi keeps all the config in this file.
- Pulumi CLI
- Appropriate AWS credentials in the form of environment variables, profile, or ec2 role.
- AWS CLI - This is needed to fetch kubeconfig to execute kubectl commands (optional)
- Clone this repository
git clone https://github.com/bit-cloner/poke.git
cd poke
- Set AWS credentials
aws configure
- Initialise Pulumi - Assuming your remote state is in AWS S3.
pulumi login s3://name-of-your-state-bucket
- Select the stack you want to use- This repo has a dev stack
pulumi stack select dev
- Deploy the stack
pulumi up
After you are happy with details of the plan, apply it by selecting Yes
This should create 2 clusters eks18-dev and eks19-dev as per declerations made in pulumi.dev.yaml file. You can tweak these elements to customise as per your requirements. For example if you want to add another cluster to your stack , add another code block and edit index.js file accordingly.