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
-
AuthorizationPolicy
Exported 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
AuthorizationPolicy
is specifying a source namespacenon-existent-namespace
that does not exist or is inaccessible, making the policy ineffective in controlling access as intended. -
ServiceEntry
Exported 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
ServiceEntry
is 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. -
VirtualService
with 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
VirtualService
configuration 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 theexportTo
field.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
exportTo
Field if UnnecessaryIf exporting the configuration is not required, consider removing the
exportTo
field 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