From 7ecda08abf1f2ad6ebca77ab7d6a9902f4811ba8 Mon Sep 17 00:00:00 2001 From: Wayne Date: Fri, 27 Mar 2026 16:35:26 +0800 Subject: [PATCH 1/2] Add files via upload --- aws-graviton-migration/POWER.md | 28 +---- .../karpenter-graviton-migration.md | 116 ++++++++++++++++++ 2 files changed, 119 insertions(+), 25 deletions(-) create mode 100644 aws-graviton-migration/karpenter-graviton-migration.md diff --git a/aws-graviton-migration/POWER.md b/aws-graviton-migration/POWER.md index 004a250..94a7722 100644 --- a/aws-graviton-migration/POWER.md +++ b/aws-graviton-migration/POWER.md @@ -65,32 +65,10 @@ This power provides access to several specialized tools: --- -## License & Legal +## Steering Files -### Power License +- **karpenter-graviton-migration.md** — Guides detection and migration of Karpenter configurations (NodePool, EC2NodeClass) to use Graviton ARM64 instances. Covers gradual rollout with taints/tolerations, instance family mappings, and post-migration cleanup. Manual inclusion — when Karpenter resources (NodePool, EC2NodeClass) are detected in the workspace, prompt the user: *"I noticed Karpenter configurations in your workspace. Would you like to activate the `#karpenter-graviton-migration` steering for guidance on migrating to Graviton?"* -This power is provided by AWS and is subject to the AWS Customer Agreement and applicable AWS service terms. - -### MCP Server Licenses - -This power uses the following MCP server and tools: - -- **arm-mcp** (`armswdev/arm-mcp:latest`): Docker container providing Arm migration tools - - Distributed via Docker Hub by Arm - - Contains multiple open-source tools with their respective licenses - - For complete license information, see: https://github.com/arm/mcp/blob/main/LICENSE - - -### Third-Party Dependencies - -This power requires Docker to run the MCP server container. Docker is subject to its own licensing terms. See: https://www.docker.com/legal/docker-subscription-service-agreement/ - -### Usage Terms - -By using this power, you acknowledge that: -- You are responsible for compliance with all applicable licenses -- Code analysis is performed using open-source tools within a Docker container -- You should review and comply with individual tool licenses for production use --- @@ -104,7 +82,7 @@ By using this power, you acknowledge that: ## Power Metadata -**Version**: 1.0 +**Version**: 1.1 **Author**: AWS **Supported Languages**: C++, Python, Go, JavaScript, Java **Container Runtime**: Docker required diff --git a/aws-graviton-migration/karpenter-graviton-migration.md b/aws-graviton-migration/karpenter-graviton-migration.md new file mode 100644 index 0000000..01fba58 --- /dev/null +++ b/aws-graviton-migration/karpenter-graviton-migration.md @@ -0,0 +1,116 @@ +--- +inclusion: manual +--- + +# Karpenter Configuration Migration to Graviton (ARM64) + +This steering file guides the detection and migration of Karpenter configurations to use AWS Graviton (ARM64) instances. + +## Detection + +When analyzing a workspace for Karpenter configurations, look for: + +- YAML files containing `apiVersion: karpenter.sh/v1` or `karpenter.sh/v1beta1` +- Resources of `kind: NodePool` and `kind: EC2NodeClass` +- Existing `kubernetes.io/arch` requirements set to `amd64` only +- Instance family requirements using x86-only families (e.g., `m5`, `c5`, `r5`) +- Any `nodeSelector` or `tolerations` in workload manifests referencing architecture +- Helm values files with architecture or instance-type settings for Karpenter + +## Migration Strategy + +Follow a gradual rollout approach: + +### 1. Create a Dedicated Graviton NodePool + +Create a separate NodePool for Graviton nodes rather than modifying the existing x86 NodePool. This gives independent control over instance selection and rollout pace. + +Example Graviton NodePool: + +```yaml +apiVersion: karpenter.sh/v1 +kind: NodePool +metadata: + name: graviton +spec: + disruption: + consolidationPolicy: WhenEmptyOrUnderutilized + consolidateAfter: 1m + template: + spec: + terminationGracePeriod: 24h + expireAfter: 720h + nodeClassRef: + group: karpenter.k8s.aws + kind: EC2NodeClass + name: default + taints: + - key: graviton-migration + effect: NoSchedule + requirements: + - key: karpenter.sh/capacity-type + operator: In + values: ["on-demand", "spot"] + - key: kubernetes.io/arch + operator: In + values: ["arm64"] + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: ["4"] +``` + +### 2. Add Tolerations to Workloads + +For each workload being migrated, add a toleration for the Graviton taint: + +```yaml +spec: + tolerations: + - key: graviton-migration + operator: Exists +``` + +### 3. Force Scheduling on Graviton (After Validation) + +Once a workload is validated on ARM64, pin it to Graviton nodes: + +```yaml +spec: + nodeSelector: + kubernetes.io/arch: arm64 + tolerations: + - key: graviton-migration + operator: Exists +``` + +### 4. Post-Migration Cleanup + +After all workloads are migrated: + +- Remove the `graviton-migration` taint from the Graviton NodePool +- Remove tolerations and nodeSelectors from workload specs +- Delete the old x86-only NodePool + +## Common x86 to Graviton Instance Family Mappings + +| x86 Family | Graviton Equivalent | Notes | +|------------|-------------------|-------| +| m5, m6i | m6g, m7g | General purpose | +| c5, c6i | c6g, c7g | Compute optimized | +| r5, r6i | r6g, r7g | Memory optimized | +| t3 | t4g | Burstable | + +## Key Checks + +- Verify all container images support `linux/arm64` (multi-arch or ARM64-specific) +- Check sidecar containers (service mesh proxies, logging agents) for ARM64 support +- Check DaemonSets for ARM64 compatibility +- Validate any init containers also have ARM64 images +- Use the `check_image` or `skopeo` tools from the Graviton Migration Power to verify image architecture support +- Run `migrate_ease_scan` on application source code to detect architecture-specific code + +## References + +- [Migrating from x86 to Graviton on EKS using Karpenter](https://aws.amazon.com/blogs/containers/migrating-from-x86-to-aws-graviton-on-amazon-eks-using-karpenter/) +- [Karpenter NodePool docs](https://karpenter.sh/docs/concepts/nodepools/) +- [AWS Graviton Getting Started](https://github.com/aws/aws-graviton-getting-started) From 67683d8b4dcf918a88a9265a176e0c664c78f20a Mon Sep 17 00:00:00 2001 From: Wayne Date: Fri, 27 Mar 2026 16:36:51 +0800 Subject: [PATCH 2/2] add steering file for karpenter --- .../{ => .kiro/steering}/karpenter-graviton-migration.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename aws-graviton-migration/{ => .kiro/steering}/karpenter-graviton-migration.md (100%) diff --git a/aws-graviton-migration/karpenter-graviton-migration.md b/aws-graviton-migration/.kiro/steering/karpenter-graviton-migration.md similarity index 100% rename from aws-graviton-migration/karpenter-graviton-migration.md rename to aws-graviton-migration/.kiro/steering/karpenter-graviton-migration.md