TIS1106 - Subset Not Found
A referenced subset was not found, leading to configuration errors in routing.
To prevent routing errors, ensure that subsets referenced in VirtualService
configurations are correctly defined in DestinationRule
resources. Fix typos or define missing subsets as needed.
Examples
-
VirtualService
Referring to a Non-Existent SubsetapiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: my-virtual-service
namespace: example-namespace
spec:
hosts:
- "my-app.example.com"
http:
- route:
- destination:
host: "my-app-service.example-namespace.svc.cluster.local"
subset: "v1"Explanation: The
VirtualService
references a subset namedv1
, but no corresponding subset is defined in theDestinationRule
. This causes routing issues, as Istio cannot find the specified subset.
Recommendation
Fix the routes pointing to non-existent subsets by either correcting typos in the subset name or defining the missing subset in the DestinationRule
.
-
Correct Typo in Subset Name
If the subset name is incorrect, update the
VirtualService
to reference the correct subset name.apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: my-virtual-service
namespace: example-namespace
spec:
hosts:
- "my-app.example.com"
http:
- route:
- destination:
host: "my-app-service.example-namespace.svc.cluster.local"
subset: "v1-corrected"Explanation: Correcting the subset name ensures that Istio can properly match the route to an existing subset, allowing the routing to function as intended.
-
Define the Missing Subset in
DestinationRule
If the subset is missing, define it in a
DestinationRule
to ensure it is recognized by Istio.apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: my-app-destination-rule
namespace: example-namespace
spec:
host: "my-app-service.example-namespace.svc.cluster.local"
subsets:
- name: "v1"
labels:
version: "v1"Explanation: Defining the subset in the
DestinationRule
ensures that the subset exists and matches theVirtualService
configuration, enabling proper routing to the desired version of the service.