跳到正文
Skillpedia
部署与云(DevOps)17k · #10775

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-gateway-api/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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 a GatewayClass. Key fields:

    • spec.type — proxy type (currently only Traefik)
    • spec.traefik.rawValues — raw Helm values passed to the Traefik chart
    • spec.traefik.deployment.replicas — replica count
    • spec.traefik.service.type — Service type (ClusterIP, NodePort, LoadBalancer)
    • spec.traefik.createDefaultGateway — whether to auto-create a default Gateway
    • spec.paused — pause reconciliation
    • status.conditions — condition types: Ready, Progressing, NewVersionDetected
    • status.service — Service type, ports, external IPs, load balancer status
    • status.entrypoints — exposed entrypoints with ports and protocols
    • status.gatewayClass.name — auto-created GatewayClass name
    • status.helmRelease.name — Helm release name
  • GatewayClass (gateway.networking.k8s.io/v1) — standard Kubernetes Gateway API class, auto-created by the GatewayProxy controller

  • Gateway (gateway.networking.k8s.io/v1) — standard Kubernetes Gateway API gateway, associated with a GatewayClass

  • HTTPRoute / 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, or namespace
  • gatewayapi.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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能