Skip to main content
logoTetrate Istio SubscriptionVersion: Next

TIS1402 - Reference Does Not Have a Valid Service (Service Name Not Found)

References to non-existent services in your configuration can lead to failed routing, inaccessible services, and degraded performance within your Istio service mesh.

Recommendation: Update the backendRefs field to target an existing gateway.

Ensure that all references in your configurations, especially in backendRefs, point to valid and existing services or gateways to maintain proper traffic routing and service accessibility.

Examples

Here are common scenarios that trigger this error:

  1. Invalid Service Reference in HTTPRoute

    apiVersion: gateway.networking.k8s.io/v1
    kind: HTTPRoute
    metadata:
    name: backend
    namespace: default
    spec:
    parentRefs:
    - group: gateway.networking.k8s.io
    kind: Gateway
    name: eg
    rules:
    - backendRefs:
    - group: ""
    kind: Service
    name: static-file-server # Service does not exist
    port: 443
    weight: 1
    matches:
    - path:
    type: PathPrefix
    value: /

    Explanation: The HTTPRoute references a service named static-file-server that doesn't exist in the cluster, causing routing failures.

  2. Missing Service in Namespace

    apiVersion: gateway.networking.k8s.io/v1
    kind: HTTPRoute
    metadata:
    name: backend
    namespace: default
    spec:
    parentRefs:
    - group: gateway.networking.k8s.io
    kind: Gateway
    name: eg
    rules:
    - backendRefs:
    - group: ""
    kind: Service
    name: static-file-server
    namespace: prod # Service does not exist in this namespace
    port: 443
    weight: 1

    Explanation: The configuration references a service in the prod namespace, but the service doesn't exist in that namespace.

Recommendation

  1. Verify Service Existence

    Ensure that the referenced service exists in the specified namespace or in the cluster.

    apiVersion: v1
    kind: Service
    metadata:
    name: static-file-server
    namespace: default
    spec:
    ports:
    - port: 443
    protocol: TCP
    targetPort: 8443
    selector:
    app: static-file-server
    ---
    apiVersion: gateway.networking.k8s.io/v1
    kind: HTTPRoute
    metadata:
    name: backend
    namespace: default
    spec:
    parentRefs:
    - group: gateway.networking.k8s.io
    kind: Gateway
    name: eg
    rules:
    - backendRefs:
    - group: ""
    kind: Service
    name: static-file-server # Service exists
    port: 443
    weight: 1
    matches:
    - path:
    type: PathPrefix
    value: /