{"data":{"slug":"github-google-skills-skills-cloud-alloydb-basics-5e9750e204a6","title":"AlloyDB Basics: Cluster & Instance Management","summary":"Manages AlloyDB for PostgreSQL clusters, instances, and backups using the Google Cloud SDK. Ideal for setting up and configuring AlloyDB environments. Deliverables include configured clusters, instances, and backups.","url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-alloydb-basics-5e9750e204a6","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-google-skills-skills-cloud-alloydb-basics-5e9750e204a6","markdown_url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-alloydb-basics-5e9750e204a6.md","download_url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-alloydb-basics-5e9750e204a6\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before executing any `gcloud`, REST API, or MCP command, you MUST read [Usage Attribution](references\/attribution.md). For commands executed directly in the terminal, prefix `gcloud` with `CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\/1.0 (skill:alloydb-basics)\"` and append `agent-skills\/1.0 (skill:alloydb-basics)` to `User-Agent` headers.","instructions":"---\nname: alloydb-basics\nmetadata:\n  version: \"1.0.1\"\n  category: Databases\ndescription: >-\n  Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and\n  integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations.\n  Use when creating, configuring, or administering AlloyDB databases.\n  Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.\n---\n\n# AlloyDB Basics\n\nAlloyDB for PostgreSQL is a managed, PostgreSQL-compatible database service\ndesigned for enterprise-grade performance and availability. It utilizes a\ndisaggregated compute and storage architecture to scale resources independently.\nIt also provides AlloyDB AI, a collection of features that includes AI-powered\nsearch (vector, hybrid search, and AI functions), natural language capabilities,\nconversational analytics, and inference features like forecasting and model\nendpoint management to help developers build AI apps faster.\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\/attribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\/1.0 (skill:alloydb-basics)\"`\nand append `agent-skills\/1.0 (skill:alloydb-basics)` to `User-Agent` headers.\n\n## Quick Start\n\nBefore you begin, ensure you have the [Google Cloud SDK installed](https:\/\/cloud.google.com\/sdk\/docs\/install) and authenticated (`gcloud auth login`).\n\n1.  **Enable the AlloyDB API:**\n\n    ```bash\n    gcloud services enable alloydb.googleapis.com --quiet\n    ```\n\n2.  **Create a Cluster:**\n\n    ```bash\n    gcloud alloydb clusters create my-cluster --region=us-central1 \\\n        --password=my-password --network=my-vpc --quiet\n    ```\n\n    *For production environments, always use IAM database authentication instead\n    of passwords. If configuration constraint requires passwords, store them\n    securely using Secret Manager.*\n\n3.  **Create a Primary Instance:**\n\n    ```bash\n    gcloud alloydb instances create my-primary --cluster=my-cluster \\\n        --region=us-central1 --instance-type=PRIMARY --cpu-count=2 --quiet\n    ```\n\n## Reference Directory\n\nRead these supplementary files when specific context or detailed steps are\nrequired for a task:\n\n-   To understand architecture, regional availability, connectivity (Private IP,\n    Public IP, PSA, PSC), backups, point-in-time recovery, scaling (vertical and\n    horizontal), or Quota management: read\n    [Core Concepts](references\/core-concepts.md).\n-   To manage clusters, instances, scaling, or backups via the CLI: read\n    [CLI Usage](references\/cli-usage.md).\n-   To configure AlloyDB remote MCP tools: read\n    [MCP Usage](references\/mcp-usage.md).\n-   To deploy AlloyDB using Terraform or Kubernetes Config Connector (KCC): read\n    [Infrastructure as Code](references\/iac-usage.md).\n-   To configure IAM roles, service usage roles, service agents, database\n    users\/privileges, or network security (public IP authorization, Auth Proxy\n    sidecar configuration): read [IAM & Security](references\/iam-security.md).\n\n*If you need product information not found in these references, use the\n`developer_knowledge:search_documents` tool (see [Developer Knowledge MCP setup](https:\/\/developers.google.com\/knowledge\/mcp) for installation instructions).*\n\n## Directives for Agents\n\nAgents MUST adhere to the following directives when answering queries related to\nAlloyDB:\n\n-   **Provide Multiple Methods:** When explaining how to perform administrative\n    tasks (like backups, scaling, or database user creation), always provide\n    both the Google Cloud Console steps and the `gcloud` CLI commands if both\n    are available in the reference documents.\n-   **Prioritize Private IP:** Recommend Private IP (especially PSC) over Public\n    IP for connections to ensure traffic remains within the Google Cloud network\n    and reduces exposure.\n-   **Require Serverless Connectors:** Verify and state that Serverless VPC\n    Access or Direct VPC Egress is required when connecting from Cloud Run to\n    Private IP.\n-   **Enforce Connectors:** Always direct users to configure the AlloyDB Auth\n    Proxy (running as a sidecar or locally) or language connectors rather than\n    direct TCP connections.\n-   **Block Open Public Access:** If Public IP is configured, warn against and\n    reject designs with `0.0.0.0\/0` in Authorized Networks as this exposes the\n    database to the entire internet.\n-   **Default to IAM Database Authentication:** Suggest IAM database\n    authentication and the `alloydbiamuser` database role instead of static\n    database passwords.\n-   **Enforce Least Privilege Connection:** When explaining connection roles,\n    explicitly state that `roles\/alloydb.client` should be used to adhere to the\n    principle of least privilege, and warn against using broader roles like\n    `roles\/alloydb.admin` for connections.\n-   **Mention All Creation Methods:** When describing how to create IAM database\n    users, explicitly state that they can be created using the Google Cloud\n    Console, the `gcloud` CLI, and the AlloyDB API.\n-   **Explain Private IP Options:** When explaining Private IP connectivity,\n    always explicitly mention and describe both **Private Services Access\n    (PSA)** and **Private Service Connect (PSC)** as the supported methods,\n    recommending PSC for new deployments.\n-   **Compare Direct Connections:** Explicitly explain that direct connections\n    (connecting directly to the private IP without connectors) are possible but\n    discouraged, and compare their security (lack of IAM\/mTLS) to secure methods\n    like the AlloyDB Auth Proxy or language connectors.\n-   **Enforce SQL Alone Warning:** When explaining IAM user creation, you MUST\n    explicitly state that \"IAM database users cannot be created using standard\n    SQL alone\" and must be registered via the control plane first.\n-   **Enforce Roles and Privileges Terminology:** When explaining database\n    object access, you MUST explicitly state that \"standard PostgreSQL roles and\n    privileges\" apply, using both terms.\n-   **Explain Backup Lifecycle:** When explaining backups, always explicitly\n    state that discrete backups exist independently of the source cluster and\n    remain active even if the source cluster is deleted.\n-   **Recommend Connectors for Public IP:** Explicitly state that secure\n    connection methods (AlloyDB Auth Proxy, Language Connectors) are\n    **especially recommended** for connections over Public IP.\n-   **Mention Autoscaling:** When explaining read pool scaling, always\n    explicitly mention the option of using **read pool autoscaling** and state\n    that it is in **Preview**.\n\n## Supporting Links\n\n-   [AlloyDB for PostgreSQL Documentation](https:\/\/docs.cloud.google.com\/alloydb\/docs\/overview.md.txt)\n-   [AlloyDB Auth Proxy GitHub Repository](https:\/\/github.com\/GoogleCloudPlatform\/alloydb-auth-proxy)\n-   [AlloyDB Java Connector GitHub Repository](https:\/\/github.com\/GoogleCloudPlatform\/alloydb-java-connector)\n-   [AlloyDB Python Connector GitHub Repository](https:\/\/github.com\/GoogleCloudPlatform\/alloydb-python-connector)\n-   [AlloyDB Go Connector GitHub Repository](https:\/\/github.com\/GoogleCloudPlatform\/alloydb-go-connector)\n","use_cases":["Creating a new AlloyDB cluster","Setting up a primary instance for a cluster","Configuring network and authentication settings"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/google\/skills\/blob\/e3c591afe426ea585e4c21799e5199d6d47cd1be\/skills\/cloud\/alloydb-basics\/SKILL.md","source_commit":"e3c591afe426ea585e4c21799e5199d6d47cd1be","license":null,"version":null,"listing_approved_at":"2026-11-17","created_at":"2026-11-16T07:48:33.000000Z","updated_at":"2026-11-17T05:10:16.000000Z","seo_title":"AlloyDB Basics: Cluster & Instance Management","seo_description":"Learn how to manage AlloyDB for PostgreSQL clusters, instances, and backups using the Google Cloud SDK. Ideal for setting up and configuring AlloyDB environments.","seo_keywords":["AlloyDB cluster creation","AlloyDB instance setup","AlloyDB network configuration","AlloyDB authentication setup"]}}