Skip to main content
logoTetrate Istio SubscriptionVersion: Next

TIS1101 - DestinationWeight on Route Does Not Have a Valid Service

The DestinationWeight on a route does not point to a valid service (host not found).

Recommendation: Ensure DestinationWeight References a Valid Service

To avoid routing failures, always ensure that the host in the destination section of the VirtualService references a valid service in the service registry. Correct the host, deploy the missing service, or remove the invalid configuration as appropriate.

Examples

  1. VirtualService with Invalid Host in DestinationWeight

    apiVersion: networking.istio.io/v1beta1
    kind: VirtualService
    metadata:
    name: my-virtual-service
    namespace: example-namespace
    spec:
    hosts:
    - "my-app.example-namespace.svc.cluster.local"
    http:
    - route:
    - destination:
    host: "unknown-service.example-namespace.svc.cluster.local"
    weight: 100

    Explanation: The VirtualService references a host unknown-service.example-namespace.svc.cluster.local in the destination section, but no corresponding service exists in the service registry. This causes routing failures, as Istio cannot determine where to send the traffic.

Recommendation

Correct the host to point to a valid service in the namespace, use an FQDN if referring to a service in another namespace, deploy the missing service, or remove the configuration linking to the non-existent service.

  1. Correct the Host to an Existing Service

    Update the host in the destination to point to a valid service.

    apiVersion: networking.istio.io/v1beta1
    kind: VirtualService
    metadata:
    name: my-virtual-service
    namespace: example-namespace
    spec:
    hosts:
    - "my-app.example-namespace.svc.cluster.local"
    http:
    - route:
    - destination:
    host: "existing-service.example-namespace.svc.cluster.local"
    weight: 100

    Explanation: Correcting the host to an existing service (existing-service.example-namespace.svc.cluster.local) ensures that the traffic can be correctly routed by Istio.

  2. Deploy the Missing Service

    If the service should exist but is missing, deploy it to the mesh.

    apiVersion: v1
    kind: Service
    metadata:
    name: unknown-service
    namespace: example-namespace
    spec:
    ports:
    - protocol: TCP
    port: 80
    targetPort: 8080
    selector:
    app: unknown-service

    Explanation: Deploying the missing service allows Istio to find the specified host and route traffic appropriately.

  3. Remove the Invalid Configuration

    If the configuration is not needed, remove the destination referencing the non-existent service.

    apiVersion: networking.istio.io/v1beta1
    kind: VirtualService
    metadata:
    name: my-virtual-service
    namespace: example-namespace
    spec:
    hosts:
    - "my-app.example-namespace.svc.cluster.local"
    http:
    - route: []

    Explanation: Removing the invalid configuration helps to avoid routing issues caused by referencing a non-existent service.