Langsung ke konten
Skillpedia
Deploy & cloud (DevOps)17k Β· #10776

kubesphere-gateway

Fungsinya

Skill ini membantu agent AI memasang, memeriksa, dan memecahkan masalah gateway ingress di KubeSphere. Skill ini untuk operator yang memakai gateway berbasis ingress-nginx untuk mengarahkan lalu lintas luar ke layanan.

Kapan dipakai

  • βœ“Saat Anda ingin memasang atau menghapus ekstensi gateway di KubeSphere.
  • βœ“Saat sebuah gateway macet di status seperti Creating atau Faulted dan Anda memerlukan penyebabnya.
  • βœ“Saat instalasi Helm gateway gagal atau pod-nya tidak sehat.

Link skill

https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-gateway/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-gateway/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œGateway proyek kami macet di status Creating. Bisakah Anda memeriksa penyebabnya dan memberi tahu langkah berikutnya?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent membaca objek gateway, statusnya, dan kondisinya. Kemudian agent memeriksa rilis Helm serta pod di balik gateway dan menyarankan perbaikannya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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, Stopped
    • status.conditions[].type=GatewayReady β€” True when fully operational
    • status.loadBalancer β€” LB ingress IPs/hostnames
    • status.service β€” Service type, ports, external IPs
  • UpgradePlan (gateway.kubesphere.io/v2alpha2) β€” batch gateway upgrade job. Key fields:

    • spec.gatewayReferences β€” list of {name, namespace} to upgrade
    • spec.targetAppVersion β€” target version
    • status.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 question with multiple: true:
    • All clusters β†’ TARGET_CLUSTERS="$READY_CLUSTERS"
    • Host cluster only β†’ TARGET_CLUSTERS="$HOST_CLUSTER"
    • (custom) β€” validate each name against $READY_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
Pertanyaan umum

Tingkat gateway apa saja yang ada?

Klaster, workspace, dan proyek. Setiap tingkat berjalan sebagai rilis ingress-nginx sendiri.

Objek mana yang dibaca agent?

Agent membaca objek gateway, termasuk status, kondisi, dan detail load balancer-nya.

Apakah ini sama dengan skill Gateway API?

Tidak. Skill ini memakai gateway berbasis ingress-nginx, sedangkan skill lain memakai Gateway API.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
17k
Peringkat
#10776
Lisensi
β€”
Diperbarui
14/7/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa