gke-expert
Google Kubernetes Engine (GKE)の運用に関する専門的な知識で、クラスタ管理、ワークロードの展開、スケーリング、監視、トラブルシューティング、最適化などを支援し、GKE環境でのKubernetes活用を強力にサポートするSkill。
📜 元の英語説明(参考)
Expert guidance for Google Kubernetes Engine (GKE) operations including cluster management, workload deployment, scaling, monitoring, troubleshooting, and optimization. Use when working with GKE clusters, Kubernetes deployments on GCP, container orchestration, or when users need help with kubectl commands, GKE networking, autoscaling, workload identity, or GKE-specific features like Autopilot, Binary Authorization, or Config Sync.
🇯🇵 日本人クリエイター向け解説
Google Kubernetes Engine (GKE)の運用に関する専門的な知識で、クラスタ管理、ワークロードの展開、スケーリング、監視、トラブルシューティング、最適化などを支援し、GKE環境でのKubernetes活用を強力にサポートするSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o gke-expert.zip https://jpskill.com/download/17008.zip && unzip -o gke-expert.zip && rm gke-expert.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17008.zip -OutFile "$d\gke-expert.zip"; Expand-Archive "$d\gke-expert.zip" -DestinationPath $d -Force; ri "$d\gke-expert.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
gke-expert.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
gke-expertフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 3
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
GKE Expert
初期評価 ユーザーからGKEのヘルプを求められた場合、以下を判断します。
- クラスタタイプ: Autopilot または Standard?
- タスク: Create, Deploy, Scale, Troubleshoot, または Optimize?
- 環境: Dev, Staging, または Production?
クイックスタートワークフロー クラスタの作成
-
Autopilot (ほとんどの場合に推奨):
gcloud container clusters create-auto CLUSTER_NAME \ --region=REGION \ --release-channel=regular -
Standard (特定のノード要件がある場合):
gcloud container clusters create CLUSTER_NAME \ --zone=ZONE \ --num-nodes=3 \ --enable-autoscaling \ --min-nodes=2 \ --max-nodes=10 -
作成後は必ず認証を行います:
gcloud container clusters get-credentials CLUSTER_NAME --region=REGIONアプリケーションのデプロイ
-
デプロイメントマニフェストの作成:
apiVersion: apps/v1 kind: Deployment metadata: name: APP_NAME spec: replicas: 3 selector: matchLabels: app: APP_NAME template: metadata: labels: app: APP_NAME spec: containers: - name: APP_NAME image: gcr.io/PROJECT_ID/IMAGE:TAG ports: - containerPort: 8080 resources: requests: cpu: 100m memory: 128Mi limits: cpu: 500m memory: 512Mi -
適用と公開:
kubectl apply -f deployment.yaml kubectl expose deployment APP_NAME --type=LoadBalancer --port=80 --target-port=8080オートスケーリングの設定
-
Pod の HPA:
kubectl autoscale deployment APP_NAME --cpu-percent=70 --min=2 --max=100 -
クラスタオートスケーリング (Standard のみ):
gcloud container clusters update CLUSTER_NAME \ --enable-autoscaling --min-nodes=2 --max-nodes=10 --zone=ZONEWorkload Identity の構成
-
クラスタで有効にする:
gcloud container clusters update CLUSTER_NAME \ --workload-pool=PROJECT_ID.svc.id.goog -
サービスアカウントのリンク:
# GCP サービスアカウントの作成 gcloud iam service-accounts create GSA_NAME ## K8s サービスアカウントの作成 kubectl create serviceaccount KSA_NAME # バインド gcloud iam service-accounts add-iam-policy-binding \ GSA_NAME@PROJECT_ID.iam.gserviceaccount.com \ --role roles/iam.workloadIdentityUser \ --member "serviceAccount:PROJECT_ID.svc.id.goog[default/KSA_NAME]" # K8s SA のアノテーション kubectl annotate serviceaccount KSA_NAME \ iam.gke.io/gcp-service-account=GSA_NAME@PROJECT_ID.iam.gserviceaccount.comトラブルシューティングガイド Pod の問題
# Pod が起動しない - イベントの確認 kubectl describe pod POD_NAME kubectl get events --field-selector involvedObject.name=POD_NAME
一般的な修正:
ImagePullBackOff: イメージが存在するか、プルシークレットを確認
CrashLoopBackOff: kubectl logs POD_NAME --previous
Pending: kubectl describe nodes (リソースの確認)
OOMKilled: メモリ制限の引き上げ
Service の問題
```bash
# エンドポイントがない
kubectl get endpoints SERVICE_NAME
kubectl get pods -l app=APP_NAME # Pod がセレクタと一致するか確認
## 接続性のテスト
kubectl run test --image=busybox -it --rm -- wget -O- SERVICE_NAME
パフォーマンスの問題
# リソース使用量の確認
kubectl top nodes
kubectl top pods --all-namespaces
## ボトルネックの発見
kubectl describe resourcequotas
kubectl describe limitranges
本番環境パターン HTTPS を使用した Ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: APP_NAME-ingress
annotations:
networking.gke.io/managed-certificates: "CERT_NAME"
spec:
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: APP_NAME
port:
number: 80
Pod Disruption Budget
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: APP_NAME-pdb
spec:
minAvailable: 1
selector:
matchLabels:
app: APP_NAME
Security Context
spec:
securityContext:
runAsNonRoot: true
runAsUser: 1000
containers:
- name: app
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
コスト最適化
-
自動的な適切なサイジングのために Autopilot を使用します
-
適切な制限でクラスタオートスケーリングを有効にします
-
重要度の低いワークロードには Spot VM を使用します:
gcloud container node-pools create spot-pool \ --cluster=CLUSTER_NAME \ --spot \ --num-nodes=2 -
リソースの requests/limits を適切に設定します
-
推奨事項については VPA を使用します: kubectl describe vpa APP_NAME-vpa
必須コマンド
# クラスタ管理
gcloud container clusters list
kubectl config get-contexts
kubectl cluster-info
## デプロイメント
kubectl rollout status deployment/APP_NAME
kubectl rollout undo deployment/APP_NAME
kubectl scale deployment APP_NAME --replicas=5
## デバッグ
kubectl logs -f POD_NAME --tail=50
kubectl exec -it POD_NAME -- /bin/bash
kubectl port-forward pod/POD_NAME 8080:80
## モニタリング
kubectl top nodes
kubectl top pods
kubectl get events --sort-by='.lastTimestamp'
外部ドキュメント
このスキルを超える詳細なドキュメントについては、以下を参照してください。
- Official GKE Docs: https://cloud.google.com/kubernetes-engine/docs
- kubectl Reference: https://kubernetes.io/docs/reference/kubectl/
- GKE Best Practices: https://cloud.google.com/kubernetes-engine/docs/best-practices
- Workload Identity: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
- GKE Pricing Calculator: https://cloud.google.com/products/calculator
クリーンアップ
kubectl delete all -l app=APP_NAME
kubectl drain NODE_NAME --ignore-daemonsets
高度なトピックのリファレンス
複雑なシナリオについては、以下を参照してください。
- ステートフルワークロード: 永続ボリュームを持つ StatefulSets を使用します
- バッチジョブ: 適切なバックオフポリシーを持つ Jobs/CronJobs を使用します
- マルチリージョン: Multi-cluster Ingress または Traffic Director を使用します
- サービスメッシュ: 高度なネットワーキングのために Anthos Service Mesh をインストールします
- GitOps: 宣言的な管理のために Config Sync または Flux を実装します
- モニタリング: Cloud Monitoring と統合するか、Prometheus をインストールします
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
GKE Expert
Initial Assessment When user requests GKE help, determine:
Cluster type: Autopilot or Standard? Task: Create, Deploy, Scale, Troubleshoot, or Optimize? Environment: Dev, Staging, or Production?
Quick Start Workflows Create Cluster Autopilot (recommended for most): bashgcloud container clusters create-auto CLUSTER_NAME \ --region=REGION \ --release-channel=regular Standard (for specific node requirements): bashgcloud container clusters create CLUSTER_NAME \ --zone=ZONE \ --num-nodes=3 \ --enable-autoscaling \ --min-nodes=2 \ --max-nodes=10 Always authenticate after creation: bashgcloud container clusters get-credentials CLUSTER_NAME --region=REGION Deploy Application
Create deployment manifest:
yamlapiVersion: apps/v1 kind: Deployment metadata: name: APP_NAME spec: replicas: 3 selector: matchLabels: app: APP_NAME template: metadata: labels: app: APP_NAME spec: containers:
- name: APP_NAME
image: gcr.io/PROJECT_ID/IMAGE:TAG
ports:
- containerPort: 8080 resources: requests: cpu: 100m memory: 128Mi limits: cpu: 500m memory: 512Mi
Apply and expose:
bashkubectl apply -f deployment.yaml kubectl expose deployment APP_NAME --type=LoadBalancer --port=80 --target-port=8080 Setup Autoscaling HPA for pods: bashkubectl autoscale deployment APP_NAME --cpu-percent=70 --min=2 --max=100 Cluster autoscaling (Standard only): bashgcloud container clusters update CLUSTER_NAME \ --enable-autoscaling --min-nodes=2 --max-nodes=10 --zone=ZONE Configure Workload Identity
Enable on cluster:
bashgcloud container clusters update CLUSTER_NAME \ --workload-pool=PROJECT_ID.svc.id.goog
Link service accounts:
bash# Create GCP service account gcloud iam service-accounts create GSA_NAME
Create K8s service account
kubectl create serviceaccount KSA_NAME
Bind them
gcloud iam service-accounts add-iam-policy-binding \ GSA_NAME@PROJECT_ID.iam.gserviceaccount.com \ --role roles/iam.workloadIdentityUser \ --member "serviceAccount:PROJECT_ID.svc.id.goog[default/KSA_NAME]"
Annotate K8s SA
kubectl annotate serviceaccount KSA_NAME \ iam.gke.io/gcp-service-account=GSA_NAME@PROJECT_ID.iam.gserviceaccount.com Troubleshooting Guide Pod Issues bash# Pod not starting - check events kubectl describe pod POD_NAME kubectl get events --field-selector involvedObject.name=POD_NAME
Common fixes:
ImagePullBackOff: Check image exists and pull secrets
CrashLoopBackOff: kubectl logs POD_NAME --previous
Pending: kubectl describe nodes (check resources)
OOMKilled: Increase memory limits
Service Issues bash# No endpoints kubectl get endpoints SERVICE_NAME kubectl get pods -l app=APP_NAME # Check if pods match selector
Test connectivity
kubectl run test --image=busybox -it --rm -- wget -O- SERVICE_NAME Performance Issues bash# Check resource usage kubectl top nodes kubectl top pods --all-namespaces
Find bottlenecks
kubectl describe resourcequotas kubectl describe limitranges Production Patterns Ingress with HTTPS yamlapiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: APP_NAME-ingress annotations: networking.gke.io/managed-certificates: "CERT_NAME" spec: rules:
- host: example.com
http:
paths:
- path: / pathType: Prefix backend: service: name: APP_NAME port: number: 80 Pod Disruption Budget yamlapiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: APP_NAME-pdb spec: minAvailable: 1 selector: matchLabels: app: APP_NAME Security Context yamlspec: securityContext: runAsNonRoot: true runAsUser: 1000 containers:
- name: app securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: ["ALL"] Cost Optimization
Use Autopilot for automatic right-sizing Enable cluster autoscaling with appropriate limits Use Spot VMs for non-critical workloads:
bashgcloud container node-pools create spot-pool \ --cluster=CLUSTER_NAME \ --spot \ --num-nodes=2
Set resource requests/limits appropriately Use VPA for recommendations: kubectl describe vpa APP_NAME-vpa
Essential Commands bash# Cluster management gcloud container clusters list kubectl config get-contexts kubectl cluster-info
Deployments
kubectl rollout status deployment/APP_NAME kubectl rollout undo deployment/APP_NAME kubectl scale deployment APP_NAME --replicas=5
Debugging
kubectl logs -f POD_NAME --tail=50 kubectl exec -it POD_NAME -- /bin/bash kubectl port-forward pod/POD_NAME 8080:80
Monitoring
kubectl top nodes kubectl top pods kubectl get events --sort-by='.lastTimestamp'
External Documentation
For detailed documentation beyond this skill:
- Official GKE Docs: https://cloud.google.com/kubernetes-engine/docs
- kubectl Reference: https://kubernetes.io/docs/reference/kubectl/
- GKE Best Practices: https://cloud.google.com/kubernetes-engine/docs/best-practices
- Workload Identity: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
- GKE Pricing Calculator: https://cloud.google.com/products/calculator
Cleanup
kubectl delete all -l app=APP_NAME kubectl drain NODE_NAME --ignore-daemonsets Advanced Topics Reference
For complex scenarios, consult:
Stateful workloads: Use StatefulSets with persistent volumes Batch jobs: Use Jobs/CronJobs with appropriate backoff policies Multi-region: Use Multi-cluster Ingress or Traffic Director Service mesh: Install Anthos Service Mesh for advanced networking GitOps: Implement Config Sync or Flux for declarative management Monitoring: Integrate with Cloud Monitoring or install Prometheus
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (6,285 bytes)
- 📎 LICENSE.txt (1,077 bytes)
- 📎 scripts/hello_world.py (3,504 bytes)