Skip to main content
logoTetrate Istio SubscriptionVersion: Next

TIS1401 - HTTPRoute Points to a Non-Existent Kubernetes Gateway

The HTTPRoute is configured to point to a non-existent Kubernetes gateway.

Recommendation: Ensure HTTPRoute Points to an Existing Gateway

To avoid routing issues, ensure the parentRefs in HTTPRoute references an existing gateway in the cluster.

Examples

  1. HTTPRoute Referencing a Non-Existent Gateway

    apiVersion: gateway.networking.k8s.io/v1alpha2
    kind: HTTPRoute
    metadata:
    name: my-http-route
    namespace: example-namespace
    spec:
    parentRefs:
    - name: non-existent-gateway
    namespace: example-namespace
    rules:
    - matches:
    - path:
    type: Prefix
    value: "/myapp"
    backendRefs:
    - name: my-app-service
    port: 80

    Explanation: The HTTPRoute is referencing a gateway named non-existent-gateway that does not exist in the namespace. This prevents the HTTPRoute from being properly applied, leading to routing issues.

Recommendation

Update the parentRefs field to target an existing gateway.

  1. Update the parentRefs to Point to an Existing Gateway

    Update the HTTPRoute to reference a valid gateway.

    apiVersion: gateway.networking.k8s.io/v1alpha2
    kind: HTTPRoute
    metadata:
    name: my-http-route
    namespace: example-namespace
    spec:
    parentRefs:
    - name: existing-gateway
    namespace: example-namespace
    rules:
    - matches:
    - path:
    type: Prefix
    value: "/myapp"
    backendRefs:
    - name: my-app-service
    port: 80

    Explanation: By updating the parentRefs to point to an existing gateway (existing-gateway), the HTTPRoute is properly applied and traffic can be routed correctly through the gateway.