content/en/docs/reference/config/analysis/ist0162/index.md
This message occurs when a gateway (usually istio-ingressgateway) offers a
port that the Kubernetes service workload selected by the gateway does not.
For example, your Istio configuration contains these values:
{{< text yaml >}}
apiVersion: networking.istio.io/v1 kind: Gateway metadata: name: istio-ingressgateway spec: selector: istio: ingressgateway servers:
apiVersion: v1 kind: Service metadata: name: istio-ingressgateway spec: selector: istio: ingressgateway ports:
In this example, the GatewayPortNotDefinedOnService message occurs because this
configuration uses port 8004, but a default IngressGateway (named istio-ingressgateway) is only open on target ports
15021, 8080 and 8443.
To resolve this problem, change your gateway configuration to use a valid port on the workload and try again.
Here's a corrected example:
{{< text yaml >}}
apiVersion: networking.istio.io/v1 kind: Gateway metadata: name: istio-ingressgateway spec: selector: istio: ingressgateway servers: