/k8s-skills:k8s-gateway-api-troubleshootingfrom k8s-skills
Troubleshoots Kubernetes Gateway API objects (GatewayClass, Gateway, HTTPRoute, GRPCRoute, TLSRoute) that fail to route. Diagnoses stuck conditions like NoMatchingParent, BackendNotFound, InvalidCertificateRef, and CRD version mismatches using kubectl get/describe, then proposes fixes. Reads first and asks before changing anything.
Ships in k8s-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Find out why a Gateway API object does not route, from the objects' status, and propose a fix. Read first, ask before changing. Run the investigation commands freely. Run a command under an "Ask first" line only after the user approves that exact command; if your credentials do not allow it, give it to the user to run. Never run a "Proposed fix"; hand it to the user.
Gateway API splits routing across roles, and each object reports what its controller
made of it in status.conditions:
controllerName. The implementation whose
controller claims that name accepts the class.allowedRoutes). A ListenerSet adds listeners to a Gateway from
another object, if the Gateway's allowedListeners admits it.parentRefs, and send traffic to backendRefs. A route reports
its status per parent, under status.parents.This skill covers what the API says and works the same in every implementation. How the data plane behaves is the implementation's part.
The commands use placeholders: my-namespace, my-gateway, my-app (the route and
its Service) and my-app.example.com. Replace them with the real names. The built-in
view role cannot read Gateway API objects (the project ships no read role); if they
are forbidden, say so and ask the user for them. Never read Secrets: not the TLS
certificates that listeners refer to, not CA bundles in Secrets. A listener's status
says whether its certificate resolves; that is enough.
kubectl get gateways shows PROGRAMMED Unknown or
False.no matches for kind, a version not
served, the safe-upgrades admission policy).Hand-offs, by skill name. When the evidence points elsewhere, continue with that skill; if it is not installed, keep going with the steps here and tell the user which skill would help:
gateway.envoyproxy.io/gatewayclass-controller),
and the objects are Accepted but traffic still fails, or its own policies are
involved: k8s-envoy-gateway-troubleshooting.istio.io/gateway-controller):
k8s-istio-troubleshooting. To Cilium (io.cilium/gateway-controller):
k8s-cilium-troubleshooting.k8s-network-troubleshooting, k8s-workload-troubleshooting.k8s-cert-manager-troubleshooting.k8s-api-troubleshooting.Work through the steps in order. Stop when you have the cause and its evidence.
1. See the classes, the Gateways and the routes.
kubectl get gatewayclasses
kubectl get gateways -A
kubectl get httproutes,grpcroutes -A
kubectl get listenersets,referencegrants,backendtlspolicies -A
If a kind is unknown to the cluster, see step 6.
2. Read the GatewayClass: its controller and whether that controller accepted it.
kubectl get gatewayclass my-class -o jsonpath='{.spec.controllerName}{"\n"}{range .status.conditions[*]}{.type}={.status} {.reason}: {.message}{"\n"}{end}'
3. Read the Gateway and each listener: Accepted and Programmed for the Gateway, then per listener Accepted, Programmed, ResolvedRefs, Conflicted and the number of attached routes.
kubectl get gateway my-gateway -n my-namespace -o jsonpath='{range .status.conditions[*]}{.type}={.status} {.reason}: {.message}{"\n"}{end}{range .status.listeners[*]}{.name}{" routes="}{.attachedRoutes}{"\n"}{range .conditions[*]}{" "}{.type}={.status} {.reason}: {.message}{"\n"}{end}{end}'
kubectl get gateway my-gateway -n my-namespace -o jsonpath='{range .spec.listeners[*]}{.name}{" "}{.protocol}{" "}{.port}{" "}{.hostname}{" allowedRoutes="}{.allowedRoutes}{" tls="}{.tls}{"\n"}{end}'
4. Read the route's status for each parent: Accepted (did it attach?) and
ResolvedRefs (are its backends usable?). An empty status means no controller wrote
anything for it.
kubectl get httproute my-app -n my-namespace -o jsonpath='{range .status.parents[*]}{.parentRef}{"\n"}{range .conditions[*]}{" "}{.type}={.status} {.reason}: {.message}{"\n"}{end}{end}'
kubectl get httproute my-app -n my-namespace -o jsonpath='{.spec.parentRefs}{"\n"}{.spec.hostnames}{"\n"}{range .spec.rules[*]}{.backendRefs}{"\n"}{end}'
5. Check what the route points at: the backend Services and their ports, and ReferenceGrants in the backend's namespace for a cross-namespace reference.
kubectl get services -n my-namespace
kubectl get service my-app -n my-namespace -o jsonpath='{range .spec.ports[*]}{.name}{" "}{.port}{" "}{.appProtocol}{"\n"}{end}'
kubectl get referencegrants -n my-namespace -o yaml
6. Check the CRDs: which Gateway API version and channel is installed, and which API versions are served.
kubectl api-resources --api-group=gateway.networking.k8s.io
kubectl get crd gateways.gateway.networking.k8s.io -o jsonpath='{.metadata.annotations.gateway\.networking\.k8s\.io/bundle-version}{" "}{.metadata.annotations.gateway\.networking\.k8s\.io/channel}{"\n"}'
kubectl get crd tlsroutes.gateway.networking.k8s.io -o jsonpath='{range .spec.versions[*]}{.name}{" served="}{.served}{" storage="}{.storage}{"\n"}{end}'
kubectl get validatingadmissionpolicies
7. Open the matching reference and follow its steps:
| What you see | Reference |
|---|---|
| A route not Accepted or with no status, ResolvedRefs False, ReferenceGrants, BackendTLSPolicy, GRPCRoute and TLSRoute | references/routes.md |
| A GatewayClass or Gateway not Accepted or Programmed, listener conditions, TLS certificates, ListenerSets, CRD versions and channels | references/gateways-and-listeners.md |
Conditions and reasons are from the Gateway API 1.6 specification; the quoted messages are Envoy Gateway 1.9's. Other implementations use the same reasons with their own messages.
Accepted Unknown, reason Pending (Waiting for controller): no
running controller claims its controllerName. A typo in the name, an implementation
that is not installed or not running, or a class meant for another cluster. Every
Gateway of the class then shows Accepted and Programmed Unknown, Pending, and
gets no address.Accepted False, InvalidParameters: its parametersRef points at
an object that does not exist or is malformed.Accepted False, ListenersNotValid (No listeners are valid: ...):
every listener is invalid; read their conditions. When only some are invalid, the
Gateway stays Accepted and Programmed and only those listeners fail.Programmed False, AddressNotAssigned: the implementation could not
give it an address, for example a LoadBalancer Service with no load balancer, or no
valid listener to serve.ResolvedRefs False, InvalidCertificateRef (No valid secrets exist: certificate refs 0: Secret my-namespace/my-app-tls does not exist.): the TLS
certificate the listener names does not exist or is not a valid TLS Secret. The
listener is Programmed False and nothing serves its port. Do not read the Secret;
the condition is the evidence.Conflicted True, ProtocolConflict or HostnameConflict: listeners
on the same port disagree on protocol, or share a hostname.ResolvedRefs False, InvalidRouteKinds: allowedRoutes.kinds names a
route kind the implementation does not support on that protocol.Accepted False, NoMatchingParent (No listeners match this parent ref): the parent ref's sectionName or port matches no listener of the Gateway.Accepted False, NotAllowedByListeners (No listeners included by this parent ref allowed this attachment.): the listener's allowedRoutes does not admit
the route's namespace or kind. The default, which the API server fills in, is
namespaces.from: Same: only routes from the Gateway's own namespace attach.Accepted False, NoMatchingListenerHostname: the route's hostnames
and the listener's hostname do not intersect.status.parents at all: no controller considers itself
responsible. The parentRefs name a Gateway that does not exist (a typo, the wrong
namespace), or one whose class nobody accepts.ResolvedRefs False, BackendNotFound or RefNotPermitted: the
backend does not exist, or is in another namespace without a ReferenceGrant there.State the cause in one sentence, then the evidence you saw (the object, the condition, its reason and message, the spec fields that disagree), then the proposed fix.
Show each fix to the user before running it: what it changes and how to undo it. Fix the object that is wrong, and prefer fixing it in its source (Git, a Helm chart), since a controller or a GitOps tool may set it back.
A route belongs to the team that publishes the app, so correcting a route's
parentRefs, hostnames or backend is reversible and goes under "Ask first". A Gateway,
its listeners and allowedRoutes, a GatewayClass, a ReferenceGrant and the CRDs are
shared: changing them changes who can route what for every team on the Gateway. Never
run those yourself; hand them to the Gateway's owners as proposed fixes. A
GatewayClass's controllerName cannot be changed after it is created. Write each undo
with the values you found.
Attach a route to the listener that exists (use the index of the parent ref you found):
Ask first: the agent runs this only after the user approves it.
kubectl patch httproute my-app -n my-namespace --type=json -p '[{"op": "replace", "path": "/spec/parentRefs/0/sectionName", "value": "http"}]'
# Undo: kubectl patch httproute my-app -n my-namespace --type=json -p '[{"op": "replace", "path": "/spec/parentRefs/0/sectionName", "value": "web"}]'
Let a listener admit routes from a team's namespace as well as its own. A selector
replaces Same, so it must also match the Gateway's namespace, or the routes already
attached there are dropped; the kubernetes.io/metadata.name label is on every
namespace. This changes who can attach routes to a shared Gateway, so the agent does not
run it:
Proposed fix: review before running. The agent does not run this.
kubectl patch gateway my-gateway -n my-namespace --type=json -p '[{"op": "replace", "path": "/spec/listeners/0/allowedRoutes", "value": {"namespaces": {"from": "Selector", "selector": {"matchExpressions": [{"key": "kubernetes.io/metadata.name", "operator": "In", "values": ["my-namespace", "my-other-namespace"]}]}}}}]'
# Undo: kubectl patch gateway my-gateway -n my-namespace --type=json -p '[{"op": "replace", "path": "/spec/listeners/0/allowedRoutes", "value": {"namespaces": {"from": "Same"}}}]'
Move a Gateway to the class whose controller runs. Its implementation then takes the Gateway over, so the agent does not run it:
Proposed fix: review before running. The agent does not run this.
kubectl patch gateway my-gateway -n my-namespace --type=merge -p '{"spec": {"gatewayClassName": "my-working-class"}}'
# Undo: kubectl patch gateway my-gateway -n my-namespace --type=merge -p '{"spec": {"gatewayClassName": "my-class"}}'
A missing listener certificate is fixed by creating or issuing it (for example a
cert-manager Certificate whose secretName is the Secret the listener names), never by
reading or copying another Secret. Give the user the name and namespace from the
listener's condition.
Checked against the Gateway API 1.6 specification and source (v1.6.3), and on a Kubernetes 1.37 kind cluster with Envoy Gateway 1.9.2 (Gateway API CRDs v1.6.1, experimental channel):
SupportedVersion).allowedRoutes and ReferenceGrants.bundle-version and channel CRD annotations, the
safe-upgrades.gateway.networking.k8s.io admission policy in the install files.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub k8s-servant/k8s-skills --plugin k8s-skills31 skills in this plugin
/k8s-aks-troubleshootingUse when a problem is specific to Azure Kubernetes Service (AKS): a cluster or node pool in "Failed" state, an upgrade or scale that fails ("UpgradeFailed", "violate the pod's disruption budget", "QuotaExceeded", "AllocationFailed"), a LoadBalancer Service stuck at <pending> ("SyncLoadBalancerFailed", "AuthorizationFailed"), an Azure Disk or Files PVC that fails ("ProvisioningFailed", "volume node affinity conflict", "Multi-Attach error", "Mount error(13)"), workload identity errors ("AADSTS700016", "AADSTS70021"), CoreDNS edits that AKS reverts, "error dialing backend", Azure Policy denials, or API server access (authorized IP ranges, private clusters, kubelogin, "User does not have access to the resource in Azure"). Investigates with kubectl and read-only az commands, and proposes fixes. Reads first and asks before changing anything./k8s-api-troubleshootingUse when the Kubernetes API server itself refuses or fails a request, before any controller acts on it: "failed calling webhook", "admission webhook ... denied the request", "ValidatingAdmissionPolicy ... denied request", a ReplicaSet with FailedCreate and no pods, an APIService "False (ServiceNotFound)", "FailedDiscoveryCheck" or "MissingEndpoints", "unable to retrieve the complete list of server APIs", a namespace stuck in Terminating, "no matches for kind" or "ensure CRDs are installed first", "strict decoding error: unknown field", a conversion webhook failure, "You must be logged in to the server (Unauthorized)", 429 "too many requests", "etcdserver:" errors, "Request entity too large" or "metadata.annotations: Too long". Investigates with kubectl get, describe, events and the health endpoints, and proposes fixes. Reads first and asks before changing anything./k8s-argocd-troubleshootingUse when Argo CD does not deploy or update an application in Kubernetes: an Application that is OutOfSync, Unknown, Degraded, Missing or Progressing, a ComparisonError ("app path does not exist", "unable to resolve ... to a commit SHA"), an InvalidSpecError ("do not match any of the allowed destinations in project"), a sync that fails ("one or more objects failed to apply"), auto-sync that never runs, resources that stay OutOfSync after a sync, or ApplicationSets that generate nothing. Investigates with kubectl get, describe, events and logs, and proposes fixes. Reads first and asks before changing anything./k8s-autoscaling-troubleshootingUse when Kubernetes autoscaling does not scale as expected: a HorizontalPodAutoscaler whose TARGETS show "<unknown>", "missing request for cpu", "unable to get metrics for resource cpu" or "FailedGetResourceMetric", an HPA stuck at maxReplicas ("TooManyReplicas") or not scaling down, "Metrics API not available" from kubectl top, metrics-server not Ready, a KEDA ScaledObject that is not Ready ("ScaledObjectCheckFailed") or creates no HPA, KEDA scalers failing, two autoscalers on one workload, or a VerticalPodAutoscaler without recommendations. Investigates with kubectl get, describe, events, logs and top, and proposes fixes. Reads first and asks before changing anything./k8s-cert-manager-troubleshootingUse when cert-manager does not issue or renew a certificate in Kubernetes: a Certificate that stays READY False, a CertificateRequest that is Pending, Denied or Failed, an Issuer or ClusterIssuer that is not Ready ("Error getting keypair for CA issuer"), "Referenced \"Issuer\" not found", ACME Orders or Challenges stuck pending (HTTP-01, DNS-01, rate limits), a certificate that expired or did not renew, or "failed calling webhook \"webhook.cert-manager.io\"" when applying resources. Investigates with kubectl get, describe, events and logs, and proposes fixes. Reads first and asks before changing anything./k8s-cilium-troubleshootingUse when networking fails on a Kubernetes cluster that runs Cilium as its CNI: traffic between pods dropped or timing out after a CiliumNetworkPolicy or CiliumClusterwideNetworkPolicy, "Policy denied" drops in Hubble, DNS that stops resolving after an egress policy, HTTP 403 "Access denied" from an L7 rule, toFQDNs rules that do not match, pods stuck ContainerCreating with "unable to connect to Cilium agent", Cilium agent or operator pods not ready, CiliumEndpoints not ready, or IPAM exhaustion. Investigates with kubectl get, describe, events and logs, asks before running cilium-dbg or hubble inside the agent, and proposes fixes. Reads first and asks before changing anything.2 plugins in one repository ship this exact skill · first indexed Nov 1, 2026
Other plugins' skills for the same job