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.
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:
-
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. -
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: 1Explanation: The configuration references a service in the
prod
namespace, but the service doesn't exist in that namespace.
Recommendation
-
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: /