临时存储类型共享和使用节点启动磁盘中的资源。您可以像管理 CPU 和内存资源一样管理本地临时存储资源。
使用 PersistentVolume 资源的永久性存储空间
Kubernetes PersistentVolume 是 Pod 可用于持久性存储的资源。永久性卷的生命周期与 pod 的生命周期无关。因此,在集群更改以及 pod 被删除和重新创建后,永久性卷中的磁盘和数据将继续存在。您可以通过 PersistentVolumeClaims API 动态预配 PersistentVolume 资源,也可以由集群管理员明确创建这些资源。
Google Distributed Cloud 可以使用各种存储系统(包括容器存储接口 [CSI] 驱动程序和本地卷)来支持永久性存储。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-01。"],[],[],null,["Google Distributed Cloud can use several storage configurations, and provides interfaces\nfor block and file storage management through the following Kubernetes objects:\n\n- [Volumes](https://kubernetes.io/docs/concepts/storage/volumes/)\n- [Persistent volumes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)\n- [Storage classes](https://kubernetes.io/docs/concepts/storage/storage-classes/)\n- [Volume snapshots](https://kubernetes.io/docs/concepts/storage/volume-snapshots/)\n\n| **Warning:** Google Distributed Cloud doesn't include a persistent storage provider. You must provide and configure a persistent storage system for your stateful workloads.\n\nEphemeral Storage through Kubernetes volumes\n\nKubernetes `Volume` resources are storage units accessible to containers in a\n`Pod`. Ephemeral storage backs the following volume types:\n\n- [`emptyDir`](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir)\n\n- [`ConfigMap`](https://kubernetes.io/docs/concepts/configuration/configmap/)\n\n- [`Secrets`](https://kubernetes.io/docs/concepts/configuration/secret/)\n\nEphemeral storage types don't persist after a pod ceases to exist. Use\nephemeral storage for configuration information and to cache storage for\napplications.\n\nEphemeral storage types share and consume resources from the node's boot disk.\nYou can [manage your local ephemeral storage resources](/kubernetes-engine/docs/concepts/cluster-architecture#local_ephemeral_storage)\nin the same way that you manage CPU and memory resources.\n\nPersistent Storage using `PersistentVolume` resources\n\nA Kubernetes `PersistentVolume` is a resource that a `Pod` can use for durable\nstorage. The lifetime of persistent volumes is independent from the lifetime of\na pod. Thus, the disk and data in a persistent volume continue to exist as the\ncluster changes and as pods are deleted and recreated. You can provision\n`PersistentVolume` resources dynamically through the `PersistentVolumeClaims`\nAPI, or a cluster administrator can create them explicitly.\n\nGoogle Distributed Cloud can back persistent storage by using a variety of storage\nsystems, including [Container Storage Interface (CSI)](https://kubernetes.io/docs/reference/glossary/?all=true#term-csi)\ndrivers and local volumes.\n\nContainer Storage Interface (CSI) drivers\n\nGoogle Distributed Cloud is compatible with [CSI v1.0 drivers](https://github.com/container-storage-interface/spec).\nCSI is an open standard interface that many major storage vendors\nsupport. For production storage, [install a CSI driver](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/install-csi-driver)\nfrom a GDC Ready storage partner.\nFor the full list of GDC Ready storage partners, see\n[GDC Ready Storage Partners](/kubernetes-engine/enterprise/docs/resources/partner-storage).\n\nTo use CSI in your cluster, deploy the CSI driver that your storage vendor\nprovided to your clusters. Then, configure workloads to\n[use the CSI driver with the `StorageClass` API](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/install-csi-driver#using_csi_driver),\nor set `StorageClass` as the [default API](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/default-storage-class).\n\nLocal volumes\n\nFor proof of concept and advanced use cases, you can use\n[local PersistentVolume resources](https://kubernetes.io/docs/concepts/storage/volumes/#local).\nGoogle Distributed Cloud bundles the\n[sig-storage-local-static-provisioner](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner),\nwhich discovers mount points on each node and creates a local persistent volume\nfor each mount point.\n| **Caution:** Using a local persistent volume binds the pods to a specific disk and node. If that disk or node becomes unavailable, then the pods also become unavailable. Workloads using local PersistentVolume resources need to be resilient to this kind of failure, and may require additional orchestration to release the persistent volume claims of the pods and find a new and empty disk on another node.\n\nGoogle Distributed Cloud clusters use the local volume provisioner (LVP) to manage local\npersistent volumes. There are three types of storage classes for local\npersistent volumes in a Google Distributed Cloud cluster:\n\n- LVP share\n- LVP node mounts\n- Anthos system\n\nLVP share\n\nThis option creates a local persistent volume that subdirectories in a local and\nshared file system are backing. Cluster creation automatically generates these\nsubdirectories. Workloads using this storage class share capacity and\ninput/output operations per second (IOPS) because the same shared file system\nbacks the persistent volumes. To have better isolation, configure disks through\nLVP node mounts.\n\nFor more information, see\n[Configuring an LVP Share](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/configure-local-storage#configuring_an_lvp_share).\n\nLVP node mounts\n\nThis option creates a local persistent volume for each mounted disk in the configured\ndirectory. You must format and mount each disk before or after cluster creation.\n\nFor more information, see\n[Configuring LVP node mounts](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/configure-local-storage#configuring_lvp_node_mounts).\n\nAnthos system\n\nThis storage class creates preconfigured local persistent volumes during cluster\ncreation that the Anthos system pods use. The storage class name is\n`anthos-system`. Don't change or delete this storage class and don't use this\nstorage class for stateful workloads.\n\nWhat's next\n\n- Learn more about [volumes](/kubernetes-engine/docs/concepts/volumes).\n- Learn more about [Container Storage Interface](https://kubernetes.io/blog/2019/01/15/container-storage-interface-ga/) in Kubernetes.\n- Learn how to [take volume snapshots](/kubernetes-engine/docs/how-to/persistent-volumes/volume-snapshots).\n- Learn how to [increase the capacity of persistent volumes](/kubernetes-engine/docs/how-to/persistent-volumes/volume-expansion)."]]