I got a Ref Arch with EKS on Fargate. How can use EKS with EC2 nodes instead of Fargate?
We've had customers ask this question often, and here are a couple of them: > We are currently investigating switching our EKS cluster away from Fargate in favor of EC2. We are attempting to use Sysdig for some of our security and compliance pieces, but have recently discovered that they do not actually support Fargate. They deploy their agents as daemonsets which Fargate doesn't support. Does the Gruntworks ref architecture support the use of EC2 nodes rather than Fargate nodes > When Gruntwork created the Reference Architecture for us, I selected Fargate as the EKS node type. Since then we've changed our mind and would prefer to use EC2 nodes. Would it be possible for Gruntwork to re-generate the HCL files provided to us in our infrastructure-live repo with the EC2 type instead? > My hope/goal is that this will allow us to streamline the transition to EC2 without any guesswork about how Gruntwork would have set this up in the first place. If I had the files as they would have originally been generated then I can just diff them against my current configuration. --- <ins datetime="2022-05-24T22:49:40Z"> <p><a href="https://support.gruntwork.io/hc/requests/108658">Tracked in ticket #108658</a></p> </ins>
Here's what you can do: - Build your worker node AMI using a version of https://github.com/gruntwork-io/terraform-aws-service-catalog/blob/master/examples/for-production/infrastructure-live/shared/us-west-2/_regional/amis/build_eks_cluster_instance.sh that maps to your environment - Update your EKS cluster _envcommon to have https://github.com/gruntwork-io/terraform-aws-service-catalog/blob/181b0a07c3b92629dec1ab25b0c9ad6d7b94aea8/examples/for-production/infrastructure-live/_envcommon/services/eks-cluster.hcl#L118-L139 - Run `apply` to roll out the new worker nodes.