Namespaces and Google Cloud projects

Config Connector creates Google Cloud resources using Kubernetes configuration. These resources are organized in Kubernetes Namespaces.

How Config Connector uses Namespaces

Config Connector can use the annotations on the resource's Namespace to determine what project, folder, or organization to create the resources in. The Namespace's annotation will only be applied if the resource configuration does not already specify where to create the resource. For more information, see Organizing resources with projects and folders

For example, if you want to create a Spanner Instance with a name of mySpanner in your project with a project ID of myProject, then run this command to annotate your namespace:

kubectl annotate namespace \

Replace NAMESPACE_NAME with your Namespace name.

Then, create a Config Connector SpannerInstance with a name of mySpanner in your namespace. Config Connector creates a corresponding Spanner in your specified Google Cloud project, based on the configured namespace annotation.

Using Namespaces with projects, folders, and organizations

Google Cloud supports organizing resources at the Project, Folder, and Organization levels. You can add Annotations to your Config Connector Namespaces to map resources to a Project, a Folder or Organization.

To learn more, see Organizing resources with projects, folders, or organizations.