kubesphere-gateway-api
它能做什么
这个技能帮助 AI 智能体设置和检查网关,使外部流量能够访问 KubeSphere 中的服务。适合使用较新 Gateway API 标准的运维人员。
适用场景
- ✓当你想在 KubeSphere 中安装或卸载 Gateway API 扩展时。
- ✓当你需要为整个集群、单个工作区或单个项目设置网关时。
- ✓当网关无法正常工作,并且你想检查其状态和代理时。
技能链接
https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-gateway-api/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我为预发布项目设置一个 Gateway API 网关,并检查它是否已就绪。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查扩展状态,在你选择的层级创建网关代理,然后检查对应的网关类和网关对象。它会报告发现的任何状态问题。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
KubeSphere Gateway API
Overview
Provides external access management using Kubernetes Gateway API with Traefik as the underlying proxy implementation. Supports three-tier gatewayproxy management:
| Tier | Scope | Name Pattern | Namespace | Description |
|---|---|---|---|---|
| Cluster | Entire cluster | gatewayproxy-cluster |
kubesphere-controls-system |
Cluster-scoped GatewayProxy |
| Workspace | Single workspace | gatewayproxy-workspace-{workspace} |
kubesphere-controls-system |
Workspace-scoped GatewayProxy |
| Project | Single project/namespace | gatewayproxy-namespace-{namespace} |
kubesphere-controls-system |
Namespace-scoped GatewayProxy |
Each GatewayProxy (gatewayproxies.gatewayapi.kubesphere.io) deploys a Traefik instance (the proxy implementation). It auto-creates a GatewayClass, and users can then create standard Gateway (gateways.gateway.networking.k8s.io) resources that reference that GatewayClass. The extension consists of three components:
- backend-extension — API server on the host cluster
- backend-agent — API server + controller-manager on every cluster (including the host cluster if selected)
- frontend — React SPA served via Nginx
Key Differentiator from kubesphere-gateway
| Aspect | kubesphere-gateway | kubesphere-gateway-api |
|---|---|---|
| Underlying proxy | ingress-nginx | Traefik |
| API standard | Custom Gateway CRD (gateway.kubesphere.io/v2alpha2) |
Kubernetes Gateway API (gateway.networking.k8s.io) + GatewayProxy CRD |
| Core resource | Gateway + standard IngressClass/Ingress |
GatewayProxy + standard Gateway/GatewayClass/HTTPRoute |
| Lifecycle management | Helm release per gateway | Helm release per GatewayProxy |
Core CRDs
GatewayProxy(gatewayapi.kubesphere.io/v1alpha1) — the proxy implementation (e.g. Traefik). When created, the controller deploys Traefik via Helm SDK and auto-creates aGatewayClass. Key fields:spec.type— proxy type (currently onlyTraefik)spec.traefik.rawValues— raw Helm values passed to the Traefik chartspec.traefik.deployment.replicas— replica countspec.traefik.service.type— Service type (ClusterIP, NodePort, LoadBalancer)spec.traefik.createDefaultGateway— whether to auto-create a default Gatewayspec.paused— pause reconciliationstatus.conditions— condition types:Ready,Progressing,NewVersionDetectedstatus.service— Service type, ports, external IPs, load balancer statusstatus.entrypoints— exposed entrypoints with ports and protocolsstatus.gatewayClass.name— auto-created GatewayClass namestatus.helmRelease.name— Helm release name
GatewayClass(gateway.networking.k8s.io/v1) — standard Kubernetes Gateway API class, auto-created by the GatewayProxy controllerGateway(gateway.networking.k8s.io/v1) — standard Kubernetes Gateway API gateway, associated with a GatewayClassHTTPRoute/GRPCRoute/TLSRoute/TCPRoute/UDPRoute— standard Kubernetes Gateway API route resources
Multi-Tenant Scoping
GatewayProxy and Gateway are scoped via labels:
gatewayapi.kubesphere.io/scope-type—cluster,workspace, ornamespacegatewayapi.kubesphere.io/scope-workspace— workspace name (for workspace scope)gatewayapi.kubesphere.io/scope-namespace— namespace name (for namespace scope)
Monitoring Integration
GatewayProxy exposes Traefik metrics via Prometheus. Requires the whizard-monitoring extension (optional dependency). Log search requires the whizard-logging extension.
Before You Start
Check if Gateway API extension is already installed:
kubectl get insta
常见问题
三个网关层级是什么?
集群、工作区和项目。每个层级都有自己的网关代理。
该技能使用哪种代理?
它使用 Traefik 作为 Kubernetes Gateway API 背后的代理。
它与旧的网关技能有何不同?
旧技能使用基于 ingress-nginx 的网关,本技能使用较新的 Gateway API 标准。
详情
作者的原始描述
KubeSphere Gateway API extension management Skill (Traefik based, uses Kubernetes Gateway API + GatewayProxy CRD gatewayapi.kubesphere.io/v1alpha1). This is the newer Kubernetes Gateway API standard. For the older Ingress API based gateway (ingress-nginx + Gateway CRD gateway.kubesphere.io/v2alpha2), see the kubesphere-gateway skill instead. Covers installation, uninstallation, status checks, GatewayProxy status inspection, and troubleshooting.
repo: kubesphere/kubesphere
热度
- GitHub 星标
- 17k
- 排名
- #10775
- 许可证
- —
- 更新时间
- 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,设置集群巡检规则和计划,并阅读巡检报告。