メインコンテンツにスキップAWS Startups
  1. プロンプトライブラリ
  2. Karpenter + KEDA: スポットインスタンスを使用したコスト最適化された EKS

Karpenter + KEDA: スポットインスタンスを使用したコスト最適化された EKS

Karpenter 自動スケーリング、KEDA ポッド管理、およびスポットインスタンスの優先順位付けを使用して、本番環境に対応した EKS をデプロイします。Bottlerocket OS、暗号化、マルチ AZ 高可用性が含まれており、コストを考慮して最適化されています。

  • Infrastructure-as-Code

プロンプト

Deploy Cost-Optimized Karpenter on EKS with Bottlerocket, Spot Instances, and KEDA

Act as a DevOps engineer and help me deploy Karpenter on an EKS cluster with the following requirements:

Cluster Elasticity & Scaling:

Configure Karpenter to make the cluster as elastic as possible
Set up KEDA to manage pod scaling based on CPU usage
Karpenter should handle node provisioning based on pod demands
Node Provisioning Strategy:

Provision general-purpose nodes only
Prioritize Spot instances and check Spot availability first
Fall back to On-Demand instances only when Spot is unavailable
Enable consolidation for cost optimization
Security & Hardening:

Use Bottlerocket OS for all nodes
Disable SSH access completely
Enable EBS volume encryption
High Availability:

Deploy across multiple availability zones to maximize Spot availability
Implementation:

Use Terraform with the official EKS module to provision the EKS cluster infrastructure
Use MCP (Model Context Protocol) to connect to the Kubernetes API for deployment and configuration
Provide all necessary Terraform configurations for EKS cluster setup
Provide all necessary Kubernetes manifests, Karpenter NodePool/EC2NodeClass configurations, and KEDA ScaledObject definitions
Include any required IAM roles, policies, and service account configurations
Please create a complete, production-ready setup with all configuration files needed.

Error Management:

Use MCP to connect to the Kubernetes API and verify if the EKS cluster exists
If the cluster doesn't exist, ask me if I want to create it and provide the creation steps using Terraform
Check the Kubernetes cluster version and verify compatibility with Karpenter
Recommend the appropriate Karpenter version based on the cluster version
If there's a version incompatibility, suggest either upgrading the cluster or using a compatible Karpenter version

使用方法

ベータ
  1. AWS環境とコスト管理を設定する
  2. AWS CLI をインストールする
    • お使いの OS に対応した AWS CLI ソフトウェア名]をダウンロードしてインストールしてください。
  3. プロンプトをコピーする
    • [プロンプトをコピー] をクリックして、プロンプトをクリップボードにコピーしてください。
  4. プロンプトをテストする
    • プロンプトを AI ツール(例:Kiro CLI)に貼り付け、実行して結果を生成してください。
  5. 確認、デプロイ、監視
    • 生成されたリソースと推定コストを確認してください。
    • まずは開発環境にデプロイしてください。
    • 本番環境に移行する前に、パフォーマンスと支出を監視してください。

これらのプロンプトを使用することにより、この 免責事項 に同意したものとみなされます。