Cluster launcher
The cluster launcher is a pulumi package used to create an eks cluster. This is currently being used to deploy unchained's cluster.
Dependencies
Installing
To use from javascript or Typescript in Node.js install using either:
npm
:
$ npm install @shapeshiftoss/cluster-launcher
or yarn
:
$ yarn add @shapeshiftoss/cluster-launcher
Example Usage
Configure Route53 / DNS Registrar
In order for external-dns
and cert-manager
to opperated correctly. rootDnsName must be created in route53 manually and NS servers must be updated on registrar
- Go to route53 in AWS console
- Create a new
Hosted Zone
by clicking Create hosted zone
- Enter your
Domain Name
that you own and plan on using for this EKS cluster. Leave it public and save. - Copy the name servers found in the
NS
record it should be 4 values looking something like:
ns-1570.awsdns-04.co.uk.
ns-810.awsdns-37.net.
ns-265.awsdns-33.com.
ns-1050.awsdns-03.org.
- Update / Change nameservers wherever your domain is currently setup.
Now you are ready to use the EKSClusterLauncher
const cluster = await EKSClusterLauncher.create(app, {
rootDomainName: 'example.com',
instanceTypes: ['t3.small', 't3.medium', 't3.large']
})
const kubeconfig = cluster.kubeconfig
const k8sProvider = new Provider('kube-provider', { kubeconfig })
Deployed resources
This package deploys everything nessesary for an opperational eks cluster including:
- VPC (subnets, route tables, NAT, Internet Gateway)
- EKS Cluster (Master Node)
- Managed Node group per AZ (Worker Nodes)
- Namespace in cluster for all of the additional services
<name>-infra
- Additional Services:
- Cert Manager configured for lets encrypt
- Traefik as Ingress Controller
- External DNS for dynamic configuration of route53 records from Ingress objects
- A simple Hello World app at
helloworld.<rootDomainName>
to see that all components are working correctly
Additional Notes
- traefik dashboard is accessible through port forwarding at path
/dashboard/#
- we are currently using instance role for route53, but this can be dangerous because ALL pods in cluster will be allowed to modify route53. Be careful with what workloads are running in this cluster