Logo Gateway Api

Gateway Api

Cộng đồng
nitinjain999
gateway-api

Migrate from the retired ingress-nginx controller to Kubernetes Gateway API, and design, debug, and review Gateway API ingress. Covers annotation inventory and risk triage, ingress2gateway conversion, implementation choice (Envoy Gateway default, Cilium, Istio, NGINX Gateway Fabric, AWS Load Balancer Controller), CRD channel and lifecycle, shared-Gateway ownership, cert-manager listener TLS, Flux layering, parallel-run DNS cutover, and rollback. Use when asked to "migrate off ingress-nginx", "convert my Ingresses to HTTPRoute", "set up Gateway API", "why is my HTTPRoute not attached", or "plan the ingress cutover". Flux reconciliation stuck → /platform-skills:gitops. East-west HTTPRoute in a mesh → /platform-skills:linkerd.

Add to TypingMind

Tổng quan

Nhà phát hànhnitinjain999
Kho mãplatform-skills
Tên kỹ nănggateway-api
Sao
71
Bản fork
14
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được nitinjain999 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Gateway Api trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/nitinjain999/platform-skills/tree/main/plugins/platform-skills/skills/gateway-api
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nitinjain999/platform-skills.git /tmp/platform-skills
mkdir -p .claude/skills
cp -r /tmp/platform-skills/plugins/platform-skills/skills/gateway-api .claude/skills/gateway-api
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Gateway Api trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Gateway Api ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Gateway Api với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Move ingress traffic off the retired ingress-nginx controller onto Gateway API without a user-visible change, and keep a fast rollback until the old path is provably unused.

Read references/gateway-api.md before responding. It holds the implementation matrix, the ownership model, CRD channel rules, the ingress2gateway v1.2.0 annotation coverage table, cert-manager requirements, Flux layering, the seven-phase cutover, rollback by stage, and the troubleshooting table. The working layout is examples/fluxcd/basic-monorepo; a before/after pair for one Ingress is in examples/gateway-api.

This command is interactive by default. With no arguments, ask the three questions below, then run the matching mode. Never apply converted manifests or change DNS yourself: produce the change, the validation, and the rollback, and let the user run it.

Questions (no arguments)

Ask one at a time:

  1. Where are you? assess (have ingress-nginx, not started) / convert (ready to translate) / scaffold (new cluster, no Ingress yet) / cutover (Gateway works, traffic not moved) / debug (a route or Gateway is not working) / review (check existing Gateway API config) / rollback
  2. Which implementation? Envoy Gateway (default) / Cilium / Istio / NGINX Gateway Fabric / AWS Load Balancer Controller / undecided. If undecided, apply the "Choosing an implementation" table: pick by what the team already operates
  3. How is the cluster delivered? Flux / Argo CD / Helm or kubectl directly

Mode dispatch

ModeWhat it doesMutates anything?
assessInventories Ingresses, classes and annotations; classifies each annotation as auto, decision, or blockedNo
convertRuns ingress2gateway, then rewrites output for the shared-Gateway modelWrites files only
scaffoldGenerates CRDs, controller, GatewayClass, Gateway, cert-manager and Flux layersWrites files only
cutoverProduces the per-hostname shadow test, DNS plan, soak criteria and decommission gateNo
debugDiagnoses a route, listener, certificate or Gateway address problemNo
reviewReviews Gateway API manifests for correctness, security and operational safetyNo
rollbackPicks the rollback for the stage reachedNo

Mode: assess

  1. Collect:
    bash
    kubectl get ingressclass
    # One row per Ingress annotation, keeping the resource identity and hosts,
    # so every annotation can be traced to the Ingress that carries it.
    # Columns: namespace, name, class, hosts, annotation, value. The value is
    # kept because several blockers are value-dependent (`rewrite-target: /$1`
    # uses a capture group; a snippet's body is what has to be redesigned).
    # @tsv escapes tabs and newlines, so a multi-line snippet stays on one row.
    # An Ingress with no nginx annotation still gets one row with "-".
    kubectl get ingress -A -o json | jq -r '
      .items[]
      | (.metadata.annotations // {}) as $a
      | [.metadata.namespace, .metadata.name,
         (.spec.ingressClassName // $a["kubernetes.io/ingress.class"] // "-"),
         ([.spec.rules[]?.host // "*"] | unique | join(","))] as $id
      | ([$a | to_entries[] | select(.key | startswith("nginx.ingress.kubernetes.io/")) | [.key, .value]]
         | if length == 0 then [["-", "-"]] else . end)[]
      | $id + . | @tsv' > ingress-inventory.tsv
    column -t -s $'\t' ingress-inventory.tsv
    # Cluster-wide count per annotation, to size the work
    kubectl get ingress -A -o json \
      | jq -r '.items[] | .metadata.annotations // {} | keys[]' \
      | grep '^nginx.ingress.kubernetes.io/' | sort | uniq -c | sort -rn
    # Controller-wide settings also change behaviour, not just annotations
    kubectl get configmap -A -l app.kubernetes.io/name=ingress-nginx -o yaml
  2. Classify every annotation against the coverage table in references/gateway-api.md:
    • auto: ingress2gateway converts it to core Gateway API
    • decision: converted to an implementation-specific policy, or converted with different semantics (timeouts, IP ranges, regex)
    • blocked: warned-and-dropped or not recognised (configuration-snippet, server-snippet, auth, rate limiting). Each needs an owner and a design before conversion
  3. Flag controller ConfigMap keys that set global behaviour (custom headers, timeouts, use-forwarded-headers, ssl-redirect). They do not appear on any Ingress and are the easiest to lose
  4. Output a table: namespace, Ingress, host, class, annotations by category, owner, blocking yes/no. End with the count of blocked items. Do not proceed to convert while any item is blocked without an agreed decision

Mode: convert

  1. Confirm assess has no open blocked items
  2. Run, one namespace at a time:
    bash
    ingress2gateway print --providers=ingress-nginx --emitter=envoy-gateway \
      -n <namespace> > converted-<namespace>.yaml
    Use --emitter=standard for a non-Envoy implementation, and --ingress-nginx-ingress-class=<class> when the class is not nginx. Never pass --allow-experimental-gw-api on a standard-channel cluster
  3. Treat every warning as a finding. List each one with the Ingress it came from
  4. Rewrite for the shared-Gateway model:
    • Delete generated Gateway objects
    • Set each route's parentRefs to platform-gateway in envoy-gateway-system, with the right sectionName
    • Move TLS to a Gateway HTTPS listener per hostname (cert-manager requirement)
    • Bind each HTTPS listener's allowedRoutes to the namespace that owns its hostname (kubernetes.io/metadata.name)
    • Use the Service port number in backendRefs
  5. Re-express each decision item (filter or policy) and show it next to the original annotation
  6. Validate:
    bash
    kubeconform -strict -summary \
      -schema-location default \
      -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' \
      converted-<namespace>.yaml
  7. State what is not covered by the converted output, plainly

Mode: scaffold

Generate the layout from examples/fluxcd/basic-monorepo, adapted to the answers:

  1. CRDs: standard channel, applied as plain manifests, never through a Helm release (they exceed the 1 MiB release Secret). For Flux: one Kustomization per source with prune: false and deletionPolicy: Orphan: Gateway API config/crd/standard at the pinned tag, plus Envoy Gateway's charts/crds/crds/generated/ from the pinned chart artifact. Set crds.enabled: false on the controller chart
  2. Controller: pinned exact version; at least two control-plane replicas in production
  3. Data plane: at least two proxy replicas plus a PodDisruptionBudget in production. Never a PDB of minAvailable: 1 on one replica
  4. GatewayClass and Gateway: one shared Gateway owned by the platform team. Port 80 from: Same (redirect and ACME only), HTTPS listeners from: Selector bound to the namespace that owns the hostname via kubernetes.io/metadata.name. Never from: All, and never one shared opt-in label across listeners: either lets a team claim another team's hostname. App namespaces are created in the platform layer, never by the app layer
  5. Redirect: a platform-owned RequestRedirect route on port 80 with statusCode: 308
  6. TLS: cert-manager v1.15+ with config.gatewayAPI.enabled: true, the cert-manager.io/cluster-issuer annotation on the Gateway, and the gatewayHTTPRoute HTTP-01 solver. cert-manager must start after the CRDs exist (its layer dependsOn the CRD Kustomizations)
  7. Delivery: for Flux, three layers (infrastructure → infrastructure-configs → apps) with a healthCheckExprs entry on Gateway Programmed. For Argo CD, sync waves in the same order
  8. NetworkPolicy: allow app ingress only from the proxy pods (namespace and pod selector)
  9. Run bash examples/gateway-api/gateway-api-validate.sh against the adapted copy, or the kubeconform command above

Mode: cutover

Produce a per-hostname plan following the migration path in references/gateway-api.md:

  1. Pre-flight: Gateway Programmed=True, every route Accepted=True and ResolvedRefs=True, every certificate Ready
  2. TTL: lower the DNS TTL to 60s at least one old-TTL period before the switch
  3. Shadow test each hostname against the new address without touching DNS:
    bash
    # The address can be an IP or a hostname (cloud LBs often publish a DNS name).
    # --connect-to accepts either and keeps the URL host for Host and TLS SNI;
    # --resolve only accepts an IP and fails to parse a hostname.
    NEW_ADDR=$(kubectl get gateway platform-gateway -n envoy-gateway-system -o jsonpath='{.status.addresses[0].value}')
    curl -sS -o /dev/null -w '%{http_code} %{time_total}\n' \
      --connect-to <host>:443:"$NEW_ADDR":443 https://<host>/<health-path>
    Compare status codes, key response headers, redirects and p99 latency with the old path
  4. Order: lowest-risk hostname first; one hostname per change
  5. Soak criteria: error rate and p99 within SLO for at least one full business cycle
  6. Decommission gate: no requests on the old load balancer for the whole soak. Decommissioning is its own change, never the cutover change

Blast radius: one hostname per DNS change. Nothing else moves.

Mode: debug

  1. Collect:
    bash
    kubectl get gatewayclass
    kubectl get gateway -A
    kubectl describe gateway <name> -n <namespace>
    kubectl get httproute <name> -n <namespace> -o yaml   # read .status.parents
    kubectl get certificate,certificaterequest -A
    kubectl get svc -n envoy-gateway-system
    kubectl logs -n envoy-gateway-system deploy/envoy-gateway --tail=100
  2. Classify the layer: CRD/chart rendering (install fails, admission policy errors), reconciliation (Flux or Argo stuck, no matches for kind), runtime (route or Gateway conditions)
  3. Read the condition reason and match it to the troubleshooting table in references/gateway-api.md (NotAllowedByListeners, NoMatchingListenerHostname, BackendNotFound, RefNotPermitted, AddressNotAssigned)
  4. State the most likely root cause with the exact field to change, the corrected YAML, the verification command, and the rollback

Mode: review

Review in this order and separate critical findings from improvements:

  1. Correctness: backendRefs use port numbers; listener hostnames cover route hostnames; every HTTPS listener has hostname, tls.mode: Terminate and certificateRefs; configs depend on CRDs
  2. Security: no from: All on shared listeners; each HTTPS listener binds to the namespace owning its hostname, not a shared label; ReferenceGrants are as narrow as possible; NetworkPolicy admits only proxy pods; no experimental channel unless deliberate
  3. Operational safety: CRDs are plain manifests that are never pruned or deleted with their owner; the controller chart does not install CRDs; proxy replicas ≥ 2 with a PDB in production; exact version pins; a Programmed health check
  4. Portability: implementation-specific policies are listed and justified

Mode: rollback

Ask which stage was reached, then apply the rollback table in references/gateway-api.md:

StageRollback
Before DNS cutoverDelete the new routes; nothing user-facing changed
After cutover, ingress-nginx still runningPoint DNS back at the ingress-nginx address
After decommissionRevert the decommission commit; Flux or Argo re-creates ingress-nginx and the Ingress objects; then switch DNS
Bad CRD upgradeRevert the CRD source tag in Git. Never delete a CRD or its Kustomization

Output format

Every mode ends with:

  • Findings or changes, with exact files and fields
  • Blast radius, in one line
  • Validation, as commands to run
  • Rollback, as the concrete step for the stage reached

Câu hỏi thường gặp

Kỹ năng AI Gateway Api làm được gì?

Migrate from the retired ingress-nginx controller to Kubernetes Gateway API, and design, debug, and review Gateway API ingress. Covers annotation inventory and risk triage, ingress2gateway conversion, implementation choice (Envoy Gateway default, Cilium, Istio, NGINX Gateway Fabric, AWS Load Balancer Controller), CRD channel and lifecycle, shared-Gateway ownership, cert-manager listener TLS, Flux layering, parallel-run DNS cutover, and rollback. Use when asked to "migrate off ingress-nginx", "convert my Ingresses to HTTPRoute", "set up Gateway API", "why is my HTTPRoute not attached", or "p...

Vì sao nên dùng Gateway Api trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Gateway Api là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Gateway Api trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/nitinjain999/platform-skills/tree/main/plugins/platform-skills/skills/gateway-api. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Gateway Api?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Gateway Api với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Gateway Api với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Gateway Api có miễn phí không?

Có. Kỹ năng này được nitinjain999 phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇