Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Namespace dan Google Cloud project
Config Connector membuat resource Google Cloud menggunakan konfigurasi Kubernetes. Resource ini diatur dalam
Namespace Kubernetes.
Cara Config Connector menggunakan Namespace
Config Connector dapat menggunakan anotasi pada Namespace resource untuk
menentukan project, folder, atau organisasi tempat resource akan dibuat. Anotasi
Namespace hanya akan diterapkan jika konfigurasi resource belum
menentukan tempat untuk membuat resource. Untuk mengetahui informasi selengkapnya, lihat
Mengelola resource dengan project dan folder
Misalnya, jika Anda ingin membuat Instance Cloud SQL dengan nama
mySQL dalam project dengan project ID myProject, jalankan perintah ini untuk menganotasi namespace Anda:
Kemudian, buat Config Connector SQLInstance dengan nama mySQL di
namespace Anda. Config Connector membuat instance Cloud SQL yang sesuai di project Google Cloud yang Anda tentukan, berdasarkan anotasi namespace yang dikonfigurasi.
Menggunakan Namespace dengan project, folder, dan organisasi
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-11 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)."]]