After you create an Istio gateway in Service Mesh (ASM), running kubectl get gateway --all-namespaces returns No resources found or lists Kubernetes Gateway API gateways instead of Istio gateways. Both APIs define a resource named Gateway, and kubectl cannot distinguish between them.
Cause
ASM instances running Istio 1.8.6 or later automatically install the Kubernetes Gateway API. This creates a naming conflict: both the Kubernetes Gateway API (gateway.networking.k8s.io) and the Istio API (networking.istio.io) define a resource called Gateway. The two Gateway resources serve similar purposes but belong to different API groups.
When you run kubectl get gateway, kubectl resolves the ambiguous short name to one API group -- typically gateway.networking.k8s.io. The result depends on which resource kubectl resolves to:
If no Kubernetes Gateway API gateways exist, kubectl returns
No resources found.If Kubernetes Gateway API gateways exist, kubectl returns those instead of your Istio gateways.
Verify the conflict
Run the following command to confirm that both Gateway resources are registered in your cluster:
kubectl api-resources | grep gatewayExpected output when both APIs are installed:
gateways gw networking.istio.io/v1beta1 true Gateway
gateways gtw gateway.networking.k8s.io/v1 true GatewayBoth rows share the resource name gateways, which is why the unqualified kubectl get gateway command is ambiguous.
Solution
Use a fully qualified resource name or the correct short name to target the specific Gateway type.
Query Istio gateways
Run either of the following commands:
# Option 1: Istio-specific short name
kubectl get gw --all-namespaces
# Option 2: Fully qualified resource name
kubectl get gateways.networking.istio.io --all-namespacesQuery Kubernetes Gateway API gateways
# Option 1: Kubernetes Gateway API short name
kubectl get gtw --all-namespaces
# Option 2: Fully qualified resource name
kubectl get gateways.gateway.networking.k8s.io --all-namespacesQuick reference
| Target resource | Short name | Fully qualified name |
|---|---|---|
| Istio gateway | gw | gateways.networking.istio.io |
| Kubernetes Gateway API gateway | gtw | gateways.gateway.networking.k8s.io |
You can also view Istio gateways in the ASM console without using kubectl.