title: Istio Gateway/VirtualService does not work (local ip works)
body: <p>I just set up istio for the first time on a service, and i cannot get the gateway/vs working.</p>
  
  <p>Here is my configuration, it is according with the docs:</p>
  
  <pre><code>apiVersion: networking.istio.io/v1alpha3
  kind: Gateway
  metadata:
    name: dragon-gateway
  spec:
    selector:
      # use Istio default gateway implementation
      istio: ingressgateway
    servers:
    - port:
        number: 80
        name: http
        protocol: HTTP
      hosts:
      - "*"
  ---
  apiVersion: networking.istio.io/v1alpha3
  kind: VirtualService
  metadata:
    name: dragon
  spec:
    hosts:
    - "vtest.westus.cloudapp.azure.com"
    gateways:
    - dragon-gateway
    http:
    - match:
      - uri:
          prefix: /
      - uri:
          prefix: /status
      - uri:
          prefix: /delay
      - uri:
          prefix: /api/values
      route:
      - destination:
          host: dragon
          port:
            number: 80
  </code></pre>
  
  <p>The kubectl describe looks fine:</p>
  
  <pre><code>Name:         dragon-gateway
  Namespace:    default
  Labels:       &lt;none&gt;
  Annotations:  kubectl.kubernetes.io/last-applied-configuration:
                  {"apiVersion":"networking.istio.io/v1alpha3","kind":"Gateway","metadata":{"annotations":{},"name":"dragon-gateway","namespace":"default"},...
  API Version:  networking.istio.io/v1alpha3
  Kind:         Gateway
  Metadata:
    Creation Timestamp:  2019-09-22T22:54:31Z
    Generation:          1
    Resource Version:    723889
    Self Link:           /apis/networking.istio.io/v1alpha3/namespaces/default/gateways/dragon-gateway
    UID:                 f0738082-dd8b-11e9-b099-e259debf6109
  Spec:
    Selector:
      Istio:  ingressgateway
    Servers:
      Hosts:
        *
      Port:
        Name:      http
        Number:    80
        Protocol:  HTTP
  
  
  Name:         dragon
  Namespace:    default
  Labels:       &lt;none&gt;
  Annotations:  kubectl.kubernetes.io/last-applied-configuration:
                  {"apiVersion":"networking.istio.io/v1alpha3","kind":"VirtualService","metadata":{"annotations":{},"name":"dragon","namespace":"default"},"...
  API Version:  networking.istio.io/v1alpha3
  Kind:         VirtualService
  Metadata:
    Creation Timestamp:  2019-09-22T22:54:31Z
    Generation:          1
    Resource Version:    723891
    Self Link:           /apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/dragon
    UID:                 f0988c3c-dd8b-11e9-b099-e259debf6109
  Spec:
    Gateways:
      dragon-gateway
    Hosts:
      vtest.westus.cloudapp.azure.com
    Http:
      Match:
        Uri:
          Prefix:  /
        Uri:
          Prefix:  /status
        Uri:
          Prefix:  /delay
        Uri:
          Prefix:  /api/values
      Route:
        Destination:
          Host:  dragon
          Port:
            Number:  80
  </code></pre>
  
  <p>The service has the configuration as follow:</p>
  
  <pre><code>apiVersion: v1
  kind: Service
  metadata:
    namespace: flight
    name: dragon
    labels:
      app: dragon
      release: r1
      version: 1.0.0
  spec:
  type: ClusterIP
    ports:
        - name: http
          port: 80
          targetPort: 80
        - name: https
          port: 443
          targetPort: 80
  
   selector:
      app: dragon
      release: r1
  </code></pre>
  
  <p>The docker file is quite simple:</p>
  
  <pre><code>FROM microsoft/dotnet:latest AS runtime
  
  
  # ports 
  EXPOSE 80
  EXPOSE 443
  
  WORKDIR /
  COPY /publish /app
  
  RUN dir /app
  
  WORKDIR /app
  
  FROM runtime AS final
  ENTRYPOINT ["dotnet", "dragon.dll"]
  </code></pre>
  
  <p>Please let me know if you have any idea. I tried to curl from another pod, and it works. The problem is using the external IP or using the internal IP that's assigned to the gateway. None of these work.</p>
  
  <p>Thanks in advance for any clue.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Adding more info about the curl</p>
  
  <pre><code>curl 40.118.228.111/api/values -v
  *   Trying 40.118.228.111...
  * TCP_NODELAY set
  * Connected to 40.118.228.111 (40.118.228.111) port 80 (#0)
  &gt; GET /api/values HTTP/1.1
  &gt; Host: 40.118.228.111
  &gt; User-Agent: curl/7.55.1
  &gt; Accept: */*
  &gt;
  &lt; HTTP/1.1 404 Not Found
  &lt; date: Sun, 22 Sep 2019 23:27:54 GMT
  &lt; server: istio-envoy
  &lt; content-length: 0
  &lt;
  * Connection #0 to host 40.118.228.111 left intact
  </code></pre>
  
  <p>Adding proxy status as well:</p>
  
  <pre><code>NAME                                                   CDS        LDS        EDS               RDS        PILOT                           VERSION
  dragon-dc789456b-g9fxb.flight                          SYNCED     SYNCED     SYNCED (50%)      SYNCED     istio-pilot-689d75bc8-j7j8m     1.1.3
  istio-ingressgateway-5c4f9f859d-nj9sq.istio-system     SYNCED     SYNCED     SYNCED (100%)     SYNCED     istio-pilot-689d75bc8-j7j8m     1.1.3
  </code></pre>