Skip to main content
logoTetrate Istio SubscriptionVersion: Next

TIS0103 - Specified Host Not Found in Service Registry

The specified host does not have a corresponding entry in the service registry.

Recommendation: Ensure Hosts Have Corresponding Entries in the Service Registry

To prevent routing issues, ensure that all hosts specified in your Istio configuration have corresponding entries in the service registry. Correct any typographical errors, remove non-existent hosts, or create new service, service entry, or virtual service configurations for the desired host.

Examples

  1. VirtualService Refers to Non-Existent Host

    apiVersion: networking.istio.io/v1beta1
    kind: VirtualService
    metadata:
    name: invalid-host-virtual-service
    namespace: example-namespace
    spec:
    hosts:
    - "non-existent-service.example-namespace.svc.cluster.local"
    http:
    - route:
    - destination:
    host: "non-existent-service.example-namespace.svc.cluster.local"

    Explanation: The VirtualService references a host non-existent-service.example-namespace.svc.cluster.local that does not have an entry in the service registry, resulting in a routing failure.

  2. DestinationRule with Invalid Host

    apiVersion: networking.istio.io/v1beta1
    kind: DestinationRule
    metadata:
    name: invalid-host-destination-rule
    namespace: example-namespace
    spec:
    host: "unknown-service.example-namespace.svc.cluster.local"
    trafficPolicy:
    loadBalancer:
    simple: ROUND_ROBIN

    Explanation: The DestinationRule specifies a host unknown-service.example-namespace.svc.cluster.local that does not exist in the service registry, making the rule ineffective.

  3. ServiceEntry with Invalid Host

    apiVersion: networking.istio.io/v1beta1
    kind: ServiceEntry
    metadata:
    name: service-entry-invalid-host
    namespace: example-namespace
    spec:
    hosts:
    - "unknown-external-service.com"
    location: MESH_EXTERNAL
    ports:
    - number: 80
    name: http
    protocol: HTTP

    Explanation: The ServiceEntry defines an external host unknown-external-service.com, but it does not have a corresponding entry in the service registry, making the service unavailable for communication.

Recommendation

Remove the host from the list, correct any typographical errors, or deploy a new service, service entry, or virtual service pointing to the host.

  1. Correct the Hostname to an Existing Service

    Ensure that the host specified is correct and matches an existing service in the service registry.

    apiVersion: networking.istio.io/v1beta1
    kind: VirtualService
    metadata:
    name: valid-host-virtual-service
    namespace: example-namespace
    spec:
    hosts:
    - "existing-service.example-namespace.svc.cluster.local"
    http:
    - route:
    - destination:
    host: "existing-service.example-namespace.svc.cluster.local"
  2. Deploy the Missing Service

    If the host is intended to exist, deploy the service before applying the configuration.

    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: non-existent-service
    namespace: example-namespace
    spec:
    replicas: 1
    selector:
    matchLabels:
    app: non-existent-service
    template:
    metadata:
    labels:
    app: non-existent-service
    spec:
    containers:
    - name: my-container
    image: my-image
  3. Create a ServiceEntry for the Host

    If the host is external, create a ServiceEntry to add it to the service registry.

    apiVersion: networking.istio.io/v1beta1
    kind: ServiceEntry
    metadata:
    name: service-entry-valid-host
    namespace: example-namespace
    spec:
    hosts:
    - "external-service.com"
    location: MESH_EXTERNAL
    ports:
    - number: 80
    name: http
    protocol: HTTP