[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-10 UTC。"],[],[],null,["# Plan your database deployments on GKE\n\n[Autopilot](/kubernetes-engine/docs/concepts/autopilot-overview) [Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nThis page explains best practices for running databases in containers on\nGKE. You can use a [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)\nto create a set of Kubernetes-managed containerized database instances.\nYou then create a [Service](https://kubernetes.io/docs/concepts/services-networking/service/) to provide access to the database independently of any\nparticular Pod. The Service remains unchanged even if the Pod is moved\nto a different node.\n\nTo access the data in your database instance, you create\na [`PersistentVolumeClaim`](/kubernetes-engine/docs/concepts/persistent-volumes#persistentvolumeclaims) (PVC) resource and make it available to your workload.\n\nDatabases rely on local disks for persistence. A database that runs as a Service\nin a Kubernetes cluster and its database files in a `PersistentVolumeClaim` is\nbound to the lifecycle of the cluster. If the cluster is deleted, the database\nis also deleted.\n\nIf you are building or deploying a stateful application running in GKE,\nconsider using one of the following deployment options for database instances:\n\n- **Fully-managed databases** : A managed database, such as [Cloud SQL](/sql) or [Spanner](/spanner), provides reduced operational overhead and is optimized for Google Cloud infrastructure. Managed databases require less effort to maintain and operate than a database that you deploy directly in Kubernetes.\n- **Kubernetes application** : You can deploy and run a database instance (such as [MySQL](/kubernetes-engine/docs/tutorials/stateful-workloads/mysql) or [PostgreSQL](/kubernetes-engine/docs/tutorials/stateful-workloads/postgresql)) on a GKE cluster.\n\nConsiderations for database deployments on GKE\n----------------------------------------------\n\nEach of the preceding options has trade-offs, given your business goals and\nconstraints. Use the following table to decide if database deployment on\nGKE is the right choice for you.\n\nThe preceding table provides a discussion of some of the considerations for\ndatabase deployment. However, the table doesn't include all possible\nconsiderations. You also need to consider disaster recovery, connection pooling,\nand monitoring.\n\nWhat's next\n-----------\n\n- Learn how to [deploy a highly-available MySQL topology on GKE](/kubernetes-engine/docs/tutorials/stateful-workloads/mysql).\n- Learn how to [deploy a highly-available PostgreSQL instance on GKE](/kubernetes-engine/docs/tutorials/stateful-workloads/postgresql).\n- Learn more about [Backup for GKE](/kubernetes-engine/docs/add-on/backup-for-gke/concepts/backup-for-gke), a service for backing up and restoring workloads in GKE.\n- Explore [Persistent Volumes](/kubernetes-engine/docs/concepts/persistent-volumes) in more detail."]]