kubesphere-gateway
できること
このスキルは、KubeSphereでイングレスゲートウェイのインストール、確認、トラブルシューティングを行うよう、AIエージェントを支援します。ingress-nginxベースのゲートウェイで、外部のトラフィックをサービスに振り分ける運用者向けです。
使う場面
- ✓KubeSphereにゲートウェイ拡張機能をインストールまたは削除したいとき。
- ✓ゲートウェイがCreatingやFaultedなどの状態で止まり、その原因が必要なとき。
- ✓ゲートウェイのHelmインストールが失敗し、そのポッドが不健全なとき。
スキルのリンク
https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-gateway/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“プロジェクトのゲートウェイがCreatingで止まっています。原因を確認し、次の手順を教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、ゲートウェイのオブジェクト、その状態、条件を読みます。次に、ゲートウェイの背後にあるHelmのリリースとポッドを確認し、修正方法を提案します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
KubeSphere Gateway
Overview
Provides external access management (ingress) for KubeSphere using ingress-nginx. Supports three-tier gateway management:
| Tier | Scope | Name Pattern | Namespace | Label |
|---|---|---|---|
| Cluster | Entire cluster | kubesphere-router-cluster | kubesphere-controls-system | kubesphere.io/gateway-type=cluster |
| Workspace | Single workspace | kubesphere-router-workspace-{workspace} | kubesphere-controls-system | kubesphere.io/gateway-type=workspace |
| Project | Single project/namespace | kubesphere-router-{namespace} | kubesphere-controls-system | kubesphere.io/gateway-type=project |
Each gateway is a standalone Helm release of ingress-nginx. The gateway-controller-manager manages the lifecycle (install/upgrade/uninstall) via Helm.
Core CRDs
Gateway(gateway.kubesphere.io/v2alpha2) — represents a single ingress-nginx deployment. Key fields:spec.appVersion— the Helm chart version (e.g.kubesphere-nginx-ingress-<version>)spec.values— Helm values for ingress-nginx (controller config, service type, resources, etc.)status.state—Creating,Updating,Running,Faulted,Stoppedstatus.conditions[].type=GatewayReady— True when fully operationalstatus.loadBalancer— LB ingress IPs/hostnamesstatus.service— Service type, ports, external IPs
UpgradePlan(gateway.kubesphere.io/v2alpha2) — batch gateway upgrade job. Key fields:spec.gatewayReferences— list of{name, namespace}to upgradespec.targetAppVersion— target versionstatus.state—Pending,Running,Succeeded,Failed
Monitoring Integration
Gateway exposes NGINX metrics (requests, 4xx/5xx, latency P50/P90/P99) via Prometheus. Requires the whizard-monitoring extension (optional dependency).
Before You Start
Check if Gateway extension is already installed:
kubectl get installplans.kubesphere.io gateway --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=gateway \
-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: Generate and Apply InstallPlan
./scripts/generate-installplan.sh "$SELECTED_VERSION" "$TARGET_CLUSTERS"
This generates the YAML to /tmp/gateway-installplan.yaml, runs --dry-run=server, then prints the apply command.
For configurable extension values (ingress-nginx default settings, image registry, upgrade tool config, etc.), see references/extension-values.md.
Apply it:
kubectl apply -f /tmp/gateway-installplan.yaml
Tell the user "Installing". Then ask if they want to check status. If yes:
./scripts/check-s
よくある質問
どのゲートウェイのレベルがありますか?
クラスター、ワークスペース、プロジェクトがあり、それぞれがingress-nginxの独自のリリースとして動きます。
エージェントはどのオブジェクトを読みますか?
ゲートウェイのオブジェクトを読み、その状態、条件、ロードバランサーの詳細を含みます。
Gateway APIのスキルと同じですか?
いいえ。このスキルはingress-nginxベースのゲートウェイを使い、もう一方のスキルはGateway APIを使います。
詳細
作者による元の説明
KubeSphere Gateway extension management Skill (ingress-nginx based, uses Kubernetes Ingress API + Gateway CRD gateway.kubesphere.io/v2alpha2). For the newer Kubernetes Gateway API (Traefik + GatewayProxy CRD), see the kubesphere-gateway-api skill instead. Covers installation, uninstallation, status checks, gateway status inspection, and troubleshooting (gateway stuck states, Helm failures, pod issues).
repo: kubesphere/kubesphere
人気
- GitHubのスター
- 17k
- ランキング
- #10776
- ライセンス
- —
- 更新日
- 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一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。