TIS0004 - Namespace for Configuration Export is Inaccessible or Does Not Exist
The namespace to which the configuration object is exported is either inaccessible or does not exist.
By ensuring that the namespace specified for export exists and is accessible, you can avoid misconfigurations and ensure that your Istio service mesh policies are applied correctly.
Examples
-
AuthorizationPolicyExported to a Non-Existent NamespaceapiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: allow-traffic
namespace: example-namespace
spec:
rules:
- from:
- source:
namespaces: ["non-existent-namespace"]Explanation: The
AuthorizationPolicyis specifying a source namespacenon-existent-namespacethat does not exist or is inaccessible, making the policy ineffective in controlling access as intended. -
ServiceEntryExported to Inaccessible NamespaceapiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: external-service
namespace: example-namespace
spec:
exportTo:
- "unknown-namespace"
hosts:
- "external.example.com"
ports:
- number: 80
name: http
protocol: HTTPExplanation: The
ServiceEntryis being exported tounknown-namespace, which does not exist or is inaccessible. This prevents the configuration from being properly shared and used across the desired namespaces. -
VirtualServicewith Export to Inaccessible NamespaceapiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: my-virtual-service
namespace: example-namespace
spec:
exportTo:
- "inaccessible-namespace"
hosts:
- "my-service"
http:
- route:
- destination:
host: my-serviceExplanation: The
VirtualServiceconfiguration is being exported toinaccessible-namespace, which does not exist or cannot be accessed, causing the configuration to fail in being propagated correctly.
Recommendation
Select the appropriate namespace for export.
-
Specify an Existing Namespace
Ensure that the namespace specified for export actually exists and is accessible.
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: allow-traffic
namespace: example-namespace
spec:
rules:
- from:
- source:
namespaces: ["existing-namespace"] -
Use
.to Export to All NamespacesIf the intention is to export the configuration to all namespaces, use
.in theexportTofield.apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: external-service
namespace: example-namespace
spec:
exportTo:
- "."
hosts:
- "external.example.com"
ports:
- number: 80
name: http
protocol: HTTP -
Remove
exportToField if UnnecessaryIf exporting the configuration is not required, consider removing the
exportTofield to avoid issues.apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: my-virtual-service
namespace: example-namespace
spec:
hosts:
- "my-service"
http:
- route:
- destination:
host: my-service