Stay organized with collections
Save and categorize content based on your preferences.
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 Cloud SQL Instance with a name of
mySQL in your project with a project ID of myProject, then run this command to annotate your namespace:
Then, create a Config Connector SQLInstance with a name of mySQL in
your namespace. Config Connector creates a corresponding Cloud SQL instance in your
specified Google Cloud project, based on the configured namespace annotation.
Using Namespaces with projects, folders, and organizations
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eConfig Connector utilizes Kubernetes Namespaces to manage the creation of Google Cloud resources.\u003c/p\u003e\n"],["\u003cp\u003eAnnotations within a Namespace can specify the Google Cloud project, folder, or organization where Config Connector should provision resources.\u003c/p\u003e\n"],["\u003cp\u003eIf a resource configuration already includes project details, the Namespace's annotation is ignored by Config Connector.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Cloud's resource hierarchy, including Projects, Folders, and Organizations, can be mapped to Config Connector Namespaces using annotations.\u003c/p\u003e\n"]]],[],null,["# Namespaces and Google Cloud projects\n====================================\n\n*** ** * ** ***\n\nConfig Connector creates Google Cloud resources\nusing Kubernetes configuration. These resources are organized in\n[Kubernetes Namespaces](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/).\n\nHow Config Connector uses Namespaces\n------------------------------------\n\nConfig Connector can use the annotations on the resource's `Namespace` to\ndetermine what project, folder, or organization to create the resources in. The\n`Namespace`'s annotation will only be applied if the resource configuration does\nnot already specify where to create the resource. For more information, see\n[Organizing resources with projects and folders](/config-connector/docs/how-to/organizing-resources/overview)\n\nFor example, if you want to create a Cloud SQL Instance with a name of\n`mySQL` in your project with a project ID of `myProject`, then run this command to annotate your namespace: \n\n kubectl annotate namespace \\\n NAMESPACE_NAME cnrm.cloud.google.com/project-id=\"myProject\"\n\nReplace \u003cvar translate=\"no\"\u003eNAMESPACE_NAME\u003c/var\u003e with your Namespace name.\n\nThen, create a Config Connector `SQLInstance` with a name of `mySQL` in\nyour namespace. Config Connector creates a corresponding Cloud SQL instance in your\nspecified Google Cloud project, based on the configured namespace annotation.\n\nUsing Namespaces with projects, folders, and organizations\n----------------------------------------------------------\n\nGoogle Cloud supports organizing resources at the\n[Project, Folder, and Organization](/resource-manager/docs/cloud-platform-resource-hierarchy#resource-hierarchy-detail)\nlevels. You can add Annotations to your Config Connector Namespaces to map\nresources to a [Project](/resource-manager/docs/cloud-platform-resource-hierarchy#projects), a [Folder](/resource-manager/docs/cloud-platform-resource-hierarchy#folders) or\n[Organization](/resource-manager/docs/cloud-platform-resource-hierarchy#organizations).\n\nTo learn more, see\n[Organizing resources with projects, folders, or organizations](/config-connector/docs/how-to/organizing-resources/overview)."]]