Aller au contenu
Skillpedia
Déploiement et cloud (DevOps)17k · #10776

kubesphere-gateway

Ce qu’il fait

Cette skill aide un agent IA à installer, vérifier et dépanner les passerelles d'entrée dans KubeSphere. Elle s'adresse aux opérateurs qui utilisent la passerelle basée sur ingress-nginx pour acheminer le trafic externe vers les services.

Quand l’utiliser

  • ✓Quand vous voulez installer ou désinstaller l'extension de passerelle dans KubeSphere.
  • ✓Quand une passerelle reste bloquée dans un état comme Creating ou Faulted et que vous en cherchez la cause.
  • ✓Quand l'installation Helm de la passerelle échoue ou que ses pods sont en mauvaise santé.

Lien du skill

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

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-gateway/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“La passerelle de notre projet reste bloquée en Creating. Peux-tu vérifier pourquoi et me dire quelle est la prochaine étape ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent lit l'objet passerelle, son état et ses conditions. Il vérifie ensuite la version Helm et les pods derrière la passerelle, puis propose la correction.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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
Questions fréquentes

Quels niveaux de passerelle existent ?

Le cluster, l'espace de travail et le projet. Chacun fonctionne comme une version Helm ingress-nginx distincte.

Quel objet l'agent lit-il ?

Il lit l'objet passerelle, y compris son état, ses conditions et les détails de son équilibreur de charge.

Est-ce la même chose que la skill Gateway API ?

Non. Cette skill utilise la passerelle basée sur ingress-nginx, tandis que l'autre utilise Gateway API.

Détails

Description originale de l’auteur

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

Popularité

Étoiles GitHub
17k
Position au classement
#10776
Licence
—
Mis à jour
14/07/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires