aws-samples / aws-samples/sample-eks-model-benchmarks

Decouple NodePool configuration from Terraform into standalone deploy manifests

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
enhancement infrastructure
Dominant language
Go
Stars
1
Forks
2
PR merge metrics
No merged PRs in 30d

Description

## Problem

NodePool, EC2NodeClass, and device plugin configurations are currently embedded in `terraform/modules/karpenter/main.tf`. This creates
issues for users who:

- Provision their cluster via eksctl, CDK, or the console (not our Terraform)
- Use EKS Auto Mode (different provisioner API, no separate Karpenter controller)
- Want to add/modify accelerator support (e.g. enable Neuron for inf2) without running Terraform

This means users on non-Terraform clusters have no NodePools for GPU or Neuron instances, and benchmarks against accelerated instance
types (e.g. `inf2.8xlarge`) silently fail because no node can be provisioned.

## Proposal

Create a `deploy/` directory at the repo root with standalone manifests per cluster mode:
```
deploy/
karpenter/
gpu-nodepool.yaml
gpu-ec2nodeclass.yaml
neuron-nodepool.yaml
neuron-ec2nodeclass.yaml
nvidia-device-plugin.yaml
neuron-device-plugin.yaml
automode/
gpu-nodeclass.yaml
neuron-nodeclass.yaml
README.md
```

Users apply once per cluster: `kubectl apply -f deploy/karpenter/` or `kubectl apply -f deploy/automode/`.

## Why standalone manifests over Terraform
- **No Terraform dependency** — works regardless of how the cluster was provisioned.
- **Simplicity** — `kubectl apply -f` is the lowest barrier for any cluster type.
- **Version-controlled** — still lives in the repo, still reviewable in PRs.

## Scope

- [ ] Extract GPU NodePool + EC2NodeClass from Terraform into `deploy/karpenter/`
- [ ] Extract Neuron NodePool + EC2NodeClass from Terraform into `deploy/karpenter/`
- [ ] Extract NVIDIA device plugin DaemonSet + RBAC into `deploy/karpenter/`
- [ ] Extract Neuron device plugin DaemonSet + RBAC into `deploy/karpenter/`
- [ ] Create EKS Auto Mode equivalents in `deploy/automode/`
- [ ] Add `deploy/README.md` explaining which mode to pick and what to customize (cluster name, instance families, limits)
- [ ] Update root README deployment instructions to reference `deploy/`
- [ ] Keep Terraform as-is for users who want the all-in-one path (don't remove, just document the alternative)

Contributor guide

Open the contributing guide

Research direction

Read terraform/modules/karpenter/main.tf first and compare its NodePool, EC2NodeClass, and device-plugin resources with the proposed deploy/karpenter/ and deploy/automode/ paths. Use deploy/README.md and the root README as documentation entry points. Done means standalone manifests cover GPU and Neuron configurations for both modes, with instructions for applying and customizing them while Terraform remains supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, kubernetes, terraform
Domain
cloud, devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.