devops-infrastructure
クラウドインフラ設計・IaC実装・監視設定・コンテナオーケストレーション。AWS、GCP、Azureのリソース構築、Terraform/Pulumi、Kubernetes、Docker、Prometheus/Grafana監視。「インフラ」「クラウド」「Terraform」「Kubernetes」「監視」「Docker」に関する質問で使用。
When & Why to Use This Skill
This Claude skill empowers users to design, implement, and manage robust cloud infrastructure through Infrastructure as Code (IaC). It provides expert guidance and code generation for AWS, GCP, and Azure using Terraform and Pulumi, alongside container orchestration with Kubernetes and Docker. Additionally, it integrates monitoring solutions like Prometheus and Grafana to ensure high availability, security, and full system observability.
Use Cases
- Case 1: Automating the provisioning of multi-cloud resources (VPC, Subnets, IAM) using Terraform or Pulumi to ensure environment consistency.
- Case 2: Designing and deploying scalable Kubernetes clusters with optimized resource management, liveness probes, and deployment strategies.
- Case 3: Setting up comprehensive observability stacks using Prometheus and Grafana to monitor system health and performance metrics.
- Case 4: Implementing security-first infrastructure by applying least-privilege principles and automated security scanning for cloud configurations.
- Case 5: Streamlining DevOps workflows with utility scripts for infrastructure cost estimation and Kubernetes resource analysis.
| name | devops-infrastructure |
|---|---|
| description | クラウドインフラ設計・IaC実装・監視設定・コンテナオーケストレーション。AWS、GCP、Azureのリソース構築、Terraform/Pulumi、Kubernetes、Docker、Prometheus/Grafana監視。「インフラ」「クラウド」「Terraform」「Kubernetes」「監視」「Docker」に関する質問で使用。 |
DevOps インフラストラクチャ
クイックスタート
Terraform(AWS)
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
backend "s3" {
bucket = "my-terraform-state"
key = "prod/terraform.tfstate"
region = "ap-northeast-1"
}
}
provider "aws" {
region = "ap-northeast-1"
}
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "5.0.0"
name = "my-vpc"
cidr = "10.0.0.0/16"
azs = ["ap-northeast-1a", "ap-northeast-1c"]
private_subnets = ["10.0.1.0/24", "10.0.2.0/24"]
public_subnets = ["10.0.101.0/24", "10.0.102.0/24"]
enable_nat_gateway = true
}
Kubernetes Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: app
image: my-app:latest
ports:
- containerPort: 8080
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "500m"
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
インフラ設計原則
- Infrastructure as Code: すべてのリソースをコード管理
- イミュータブル: 変更は再作成で行う
- 冗長性: マルチAZ、リージョン分散
- 最小権限: IAMは必要最小限
- 観測可能性: メトリクス、ログ、トレース
詳細ガイド
- Terraform パターン: reference/terraform.md
- Kubernetes 運用: reference/kubernetes.md
- 監視・アラート: reference/monitoring.md
- セキュリティ: reference/security.md
ユーティリティスクリプト
# Terraformコスト見積もり
python scripts/estimate_cost.py terraform.tfplan
# Kubernetes リソース分析
python scripts/analyze_k8s.py deployment.yaml
# セキュリティスキャン
python scripts/security_scan.py --provider aws
ワークフロー: 新規インフラ構築
進捗チェックリスト:
- [ ] 1. 要件定義(可用性、スケーラビリティ、予算)
- [ ] 2. アーキテクチャ設計
- [ ] 3. Terraformコード作成
- [ ] 4. plan実行・レビュー
- [ ] 5. staging環境デプロイ
- [ ] 6. 監視・アラート設定
- [ ] 7. production環境デプロイ
- [ ] 8. ドキュメント作成