kubesphere-servicemesh
できること
このスキルは、ServiceMesh拡張機能を、AIエージェントが扱うよう支援します。この拡張機能は、KubeSphere内でIstio、Kiali、Jaegerを組み合わせたものです。マイクロサービスのトラフィック制御、カナリアリリース、サービスマップがほしい運用者や開発者向けです。
使う場面
- ✓KubeSphereにServiceMesh拡張機能をインストールまたはアップグレードしたいとき。
- ✓アプリの一部であるサービスに、カナリアリリースまたはブルーグリーンリリースが必要なとき。
- ✓サービスのサイドカーの注入、トラフィックの指標、トレーシングが動かないとき。
スキルのリンク
https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-servicemesh/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ショップアプリのチェックアウトサービスでカナリアリリースを実行し、トラフィックの分割を確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、メッシュがインストールされているか、どのバージョンが利用できるかを確認します。そのうえで、サービスのリリース戦略またはトラフィックポリシーを設定し、サイドカー、トポロジー、指標を確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
KubeSphere ServiceMesh
Overview
Integrates Istio, Kiali, and Jaeger to provide traffic governance for microservices. They operate on Composed App (backed by applications.app.k8s.io). A Service is governed when it has the annotation servicemesh.kubesphere.io/enabled: "true" and belongs to a Composed App.
Defines two core CRDs:
- Strategy — grayscale release task (canary, blue-green, traffic mirroring)
- ServicePolicy — traffic management (load balancing, connection pools, circuit breaking, etc.) via Istio DestinationRule
Istio handles traffic routing, Kiali provides topology visualization, and Jaeger enables tracing.
Before You Start
Check if ServiceMesh is already installed:
kubectl get installplans.kubesphere.io servicemesh --ignore-not-found
If found, upgrading is supported — just select a newer version in Step 1.
Installation
Step 1: Detect and Select Version
ALL_VERSIONS=$(kubectl get extensionversions.kubesphere.io \
-l kubesphere.io/extension-ref=servicemesh \
-o jsonpath='{range .items[*]}{.spec.version}{"\n"}{end}' | sort -V)
LATEST_STABLE=$(echo "$ALL_VERSIONS" | grep -v -E 'alpha|beta|rc' | tail -1)
if [ -z "$LATEST_STABLE" ]; then
LATEST_STABLE=$(echo "$ALL_VERSIONS" | tail -1)
fi
echo "Available versions:"
echo "$ALL_VERSIONS"
echo ""
echo "Latest stable: $LATEST_STABLE"
This sets ALL_VERSIONS and LATEST_STABLE. Use SELECTED_VERSION for the version chosen.
Use the question tool:
$LATEST_STABLE (Recommended)— accept the auto-detected version- (custom) — type a specific version; validate it against the printed list
Step 2: Detect and Select Clusters
CLUSTER_DATA=$(kubectl get clusters.cluster.kubesphere.io \
-o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.conditions[?(@.type=="Ready")].status}{"\n"}{end}')
READY_CLUSTERS=$(echo "$CLUSTER_DATA" | awk -F'\t' '$2 == "True" {print $1}')
CLUSTER_COUNT=$(echo "$READY_CLUSTERS" | wc -l)
HOST_CLUSTER=$(kubectl get clusters.cluster.kubesphere.io \
-l 'cluster-role.kubesphere.io/host' \
-o jsonpath='{.items[0].metadata.name}' || echo "")
echo "Ready clusters:"
echo "$READY_CLUSTERS"
echo ""
echo "Cluster count: $CLUSTER_COUNT"
echo "Host cluster: $HOST_CLUSTER"
This sets READY_CLUSTERS, CLUSTER_COUNT, HOST_CLUSTER.
- 1 cluster → skip selection, auto-use it. Set
TARGET_CLUSTERS="$HOST_CLUSTER" - Multiple clusters → use
questionwithmultiple: true:- All clusters →
TARGET_CLUSTERS="$READY_CLUSTERS" - Host cluster only →
TARGET_CLUSTERS="$HOST_CLUSTER" - (custom) — validate each name against
$READY_CLUSTERS
- All clusters →
Step 3: Check gateway-api Compatibility
if kubectl get installplans.kubesphere.io gateway-api --ignore-not-found &>/dev/null; then
GW_API_EXISTS=true
echo "gateway-api InstallPlan exists → will set PILOT_ENABLE_GATEWAY_API=false"
else
GW_API_EXISTS=false
echo "gateway-api not found → no compatibility config needed"
fi
echo "GW_API_EXISTS=$GW_API_EXISTS"
If GW_API_EXISTS=true, the InstallPlan config will include PILOT_ENABLE_GATEWAY_API: "false" to avoid conflicts.
Step 4: Generate and Apply InstallPlan
./scripts/generate-installplan.sh "$SELECTED_VERSION" "$TARGET_CLUSTERS" "$GW_API_EXISTS"
This generates the YAML to /tmp/servicemesh-installplan.yaml, runs --dry-run=server, then prints the apply command.
For configurable extension values (tracing sampling rate, storage backend, credentials, etc.), see references/extension-values.md.
Apply it:
kubectl apply -f /tmp/servicemesh-installplan.yaml
Tell the user "Installing". Then ask if they want to check status. If yes:
./scripts/check-status.sh poll
Status Checking
| Purpose | Command |
|---|---|
| Single snapshot | ./scripts/check-status.sh quick |
| Wait until complete (5min timeout) | ./scripts/check-status.sh poll |
Logic:
- All
Installed→ ✓ success - Any
Failed→ ✗ prints full status - Timeout (300s) → ⚠ prints current status
- In progress → prints every 10s
Uninstallation
⚠ Always confirm with the user before proceeding.
Uninstall from all clusters
if ! kubectl get installplans.kubesphere.io servicemesh --ignore-not-found &>/dev/null; then
echo "ServiceMesh is not installed."
exit 0
fi
Confirm with the user, then delete:
kubectl delete installplans.
よくある質問
サービスはどのようにメッシュに参加しますか?
サービスにメッシュのアノテーションがあり、構成されたアプリに属しているとき、管理されるとこのスキルは述べています。
メッシュにはどのツールが含まれますか?
ルーティングのためのIstio、トポロジーのためのKiali、トレーシングのためのJaegerが含まれます。
既存のインストールをアップグレードできますか?
はい。ServiceMeshがインストールされていれば、より新しいバージョンを選んでアップグレードできます。
詳細
作者による元の説明
KubeSphere ServiceMesh extension management Skill (Istio + Kiali + Jaeger). Use this skill for the ServiceMesh extension Configuration (covers installation, uninstallation, status checks), troubleshooting (covers grayscale release, sidecar injection, topology/metrics, and tracing for Composed Apps Aka Custom Applications).
repo: kubesphere/kubesphere
人気
- GitHubのスター
- 17k
- ランキング
- #10780
- ライセンス
- —
- 更新日
- 2026/7/14
コメント
- …
このリポジトリの他のスキル
frontend-forge-fe-operations
17kエージェントが、KubeSphereでFrontendExtensionリソースを管理し、ビルド、公開、デバッグを行えるよう支援します。
frontend-forge-fi-operations
17kエージェントが、KubeSphereでFrontendIntegrationリソースとfrontend-forge拡張機能を作成、更新、有効化、無効化、確認できるよう支援します。
frontend-integration-yaml
17kエージェントが、一つのメニューと一つ以上のページについて、そのまま提出できるFrontendIntegrationのYAMLを作成できるよう支援します。
kubeeye
17kエージェントが、KubeEyeをインストールし、クラスターの点検ルールと計画を設定して、点検レポートを読めるよう支援します。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。