Production grade EKS Cloudformation Templates
amazon kubernetes cloudformation
So surely there are already templates available for this? Well, if there are - they are not easily found.
Amazon provides some templates here: https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html
But this template only sets up 3 public subnets, which is not what you would want in a production environment. At least not according to Amazons own “Cluster VPC Considerations” (https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html):
"We recommend a network architecture that uses private subnets for your worker nodes and public subnets for Kubernetes to create internet-facing load balancers within."
Production grade templates
So following Amazons own recommendation, I modified their existing Cloudformation templates to make them fit for production. The result can be found here: https://github.com/hasselrot/cloudformation/tree/master/SampleEKS
Split up in to multiple templates, each template will export its outputs so that the next one can reference it.