Search code examples
kubernetesistio-gateway

Kubernetes doesn't see istio gateway


Steps:

  1. run minikube

  2. apply sample gateway https://raw.githubusercontent.com/istio/istio/release-1.19/samples/bookinfo/networking/bookinfo-gateway.yaml

    k apply -f https://raw.githubusercontent.com/istio/istio/release-1.19/samples/bookinfo/networking/bookinfo-gateway.yaml
    
  3. Try to get gateway

    k get gateway
    

enter image description here

UPD:

After restarting minikube, the gateway is created enter image description here


Solution

  • Can you check the kubernetes version you are using as Istio 1.19.0 is supported on Kubernetes versions 1.25 to 1.28 as per the official documentation.

    Also as per the Alibaba Cloud article, if you use Service Mesh (ASM) instances whose Istio version is 1.8.6 or later, you may encounter the issue No resources found as Kubernetes Gateway API is automatically installed in ASM instances.

    Both Kubernetes Gateway API and Istio API provide a resource that is named Gateway. The two Gateway resources have similar features, but they are different resources. The system cannot identify which resource that you specify when you run the command kubectl get gateway. As a result, Kubernetes gateways instead of Istio gateways may be returned. In this case, if no Kubernetes gateways are defined, no gateways are returned. You can also try with kubectl get gateway --all-namespaces to get gateway information in all namespaces.

    To overcome this situation, you can follow the below steps.

    • Use the ASM console to view Istio gateways.

    • Use a full resource name or recognizable abbreviation in the kubectl command. For example, you can use gtw to represent Kubernetes gateways, and gw to represent Istio gateways.

    • In this case, you can run kubectl get gw or kubectl get gateways.networking.istio.io to make sure that Istio gateways can be returned.