By default, Kong Operator restricts references to resources within the same namespace for security. To enable cross-namespace references, you must use one of the following resources in the target namespace:
-
ReferenceGrant: A standard Kubernetes Gateway API resource used for authorizing references from Gateway API resources to other resources. -
KongReferenceGrant: A Kong-specific resource used for authorizing references from Kong resources to other resources.
This example shows how to allow a Gateway in the kong namespace to use Konnect authentication credentials stored in the auth namespace using KongReferenceGrant. For an example using ReferenceGrant, see Reference Secrets across multiple namespaces.