kubectl-gwapi
A kubectl plugin that adds imperative create commands for the Gateway API, generating Gateways, HTTPRoutes, gRPC and L4 routes, ReferenceGrants and policies that kubectl create has no generators for.
01Problem
kubectl create ships generators for Deployments, Services and Ingresses but none for the Gateway API, so every Gateway, HTTPRoute and policy starts as hand-written YAML or a copy-paste from the docs.
02Approach
A zero-dependency Go plugin that parses compact reference and rule syntaxes, builds local object structs, renders them as Kubernetes-shaped YAML and hands them to kubectl, so the cluster's own CRDs validate the result and kubeconfig handling is never reimplemented.
03Architecture
Flags to parsers to local Gateway API structs to a hand-written YAML renderer, piped to kubectl create/apply with the connection flags forwarded; one renderer serves both --dry-run=client scaffolding and the apply path, and argv[0] switching lets the same binary install as kubectl-create-<kind> shims.
04Challenges
// to be documented
05Result
v0.1.0 covers nine kinds across the standard and experimental channels, with CI server-side dry running every kind against real Gateway API CRDs on both channels, five platform archives and a krew manifest per release.