[[["易于理解","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-03。"],[],[],null,["# Storage overview\n\nYou create persistent storage for workloads running on\nGKE on AWS with Kubernetes objects.\n\nUsing persistent storage in your GKE on AWS workloads\n-----------------------------------------------------\n\nIn GKE on AWS, you use the Kubernetes\n[PersistentVolume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)\n(PV),\n[PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#lifecycle-of-a-volume-and-claim)\n(PVC), and\n[StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/)\nresources to provide persistent file and block storage to workloads.\nYou can create snapshots of persistent storage with the\n[VolumeSnapshot](https://kubernetes.io/docs/concepts/storage/volume-snapshots/)\nand [VolumeSnapshotClass](https://kubernetes.io/docs/concepts/storage/volume-snapshot-classes/) resources.\nSnapshots are stored in your AWS account.\n\n### StorageClass\n\nClusters have a\n[default](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1)\nKubernetes StorageClass that\n[dynamically provisions](/kubernetes-engine/docs/concepts/persistent-volumes#dynamic_provisioning)\nstateful storage for workloads on AWS Elastic Block Storage (EBS) volumes. You\ncan also use a\n[custom StorageClass](/kubernetes-engine/multi-cloud/docs/aws/how-to/storage-class#custom) to\nprovision other types of volumes. These options are described in the following\nsection.\n\n### VolumeSnapshotClass\n\nClusters have a\n[default](https://kubernetes.io/docs/concepts/storage/volume-snapshot-classes/#the-volumesnapshotclass-resource)\nKubernetes VolumeSnapshotClass that creates snapshots of stateful storage on EBS\nvolumes.\n\nConfiguring cluster storage\n---------------------------\n\nIf you want to provision storage volumes with a non-default StorageClass,\nyou can\n[Create a custom StorageClass](/kubernetes-engine/multi-cloud/docs/aws/how-to/storage-class#custom)\nin a cluster that uses different parameters or a different storage driver. Then,\nyou can\n[set the default StorageClass](/kubernetes-engine/multi-cloud/docs/aws/how-to/storage-class#set_default),\nor configure your workloads to use the StorageClass. For example, you can use a\n[Reference the StorageClass in a StatefulSet](/kubernetes-engine/multi-cloud/docs/aws/how-to/storage-class#statefulset)\nto set a specific StorageClass name.\n\nUsing volume snapshots\n----------------------\n\nYou can use the\n[VolumeSnapshot](https://kubernetes.io/docs/concepts/storage/volume-snapshots/)\nresource to create snapshots of storage volumes. Then, you can\nprovision new persistent volumes from these snapshots. For more information,\nsee [Snapshot a PersistentVolume](/kubernetes-engine/multi-cloud/docs/aws/how-to/snapshot-persistentvolume).\n\nElastic Block Storage (EBS)\n---------------------------\n\nGKE on AWS manages AWS [EBS](https://aws.amazon.com/ebs/)\nvolumes with the\n[aws-ebs-csi-driver](https://github.com/kubernetes-sigs/aws-ebs-csi-driver).\n\nThe EBS CSI Driver version is tied to a GKE on AWS Kubernetes\nversion. When you upgrade your cluster version, the new driver\nversion applies automatically. This version is typically the latest driver\navailable at the time that the GKE on AWS version is released.\n\nThe driver pre-installed with GKE on AWS provides the following\nStorageClasses by default:\n\n- `standard-rwo` (default): Used for provisioning EBS `gp2` volumes.\n- `premium-rwo`: Used for provisioning EBS `io1` volumes.\n\nEBS volumes support the Kubernetes ReadWriteOnce access mode.\n| **Note:** The legacy Kubernetes `kubernetes.io/aws-ebs` volume type is not supported.\n\n### Preexisting EBS volumes\n\nYou can provision existing EBS volumes in your GKE on AWS\nworkloads. See\n[Importing a preexisting EBS volume](/kubernetes-engine/multi-cloud/docs/aws/how-to/preexisting-volume) for\nexamples on how to use EBS volumes in GKE on AWS.\n\nElastic File System (EFS)\n-------------------------\n\nGKE on AWS supports mounting preexisting\n[EFS](https://aws.amazon.com/efs/) file systems\nand access points. For more information, see\n[Use an EFS file system](/kubernetes-engine/multi-cloud/docs/aws/how-to/use-efs).\n\nAdditional storage options\n--------------------------\n\nOther third-party storage systems can be used with GKE on AWS\nthrough third-party Container Storage Interface (CSI) drivers (recommended) or\nin-tree Kubernetes volume plugins.\n| **Note:** Google does not provide support for third-party drivers. Contact your storage vendor for support.\n\n### CSI drivers\n\nThe\n[Container Storage Interface (CSI)](https://github.com/container-storage-interface/spec/blob/master/spec.md)\nis an open standard API that enables Kubernetes to attach arbitrary storage\nsystems to containerized workloads. A non-comprehensive list of CSI\n[Drivers](https://kubernetes-csi.github.io/docs/drivers.html) can\nbe found in the Kubernetes CSI Developer Documentation.\nGKE on AWS supports CSI v1.x.\n\nTo use a CSI driver in your cluster, you need to\n[install a CSI driver](/kubernetes-engine/multi-cloud/docs/aws/how-to/storage-drivers)\nprovided by your storage vendor. You can then configure workloads to use the\ndriver's StorageClass or\n[Set the default StorageClass](/kubernetes-engine/multi-cloud/docs/aws/how-to/storage-class#set_default).\n\n### Specific storage drivers\n\nThe following volume drivers can be used with GKE on AWS.\n\n#### FSx for Lustre (FSX)\n\nGKE on AWS doesn't manage\n[FSx](https://aws.amazon.com/fsx/lustre) volumes directly.\nYou can manually install the\n[aws-fsx-csi-driver](https://github.com/kubernetes-sigs/aws-fsx-csi-driver),\nbut support is not available from Google.\n\n### Kubernetes in-tree volume plugins\n\nKubernetes ships with\n[in-tree (built-in) volume plugins](https://kubernetes.io/docs/concepts/storage/volumes/#volume-types).\nSupported in-tree drivers include the following:\n\n- configMap\n- emptyDir\n- hostPath\n- nfs\n- projected\n- secrets\n\n| **Note:** Using a vendor-supported in-tree volume plugin (for example, `awsElasticBlockStore`) is not recommended. New Kubernetes storage features, such as volume snapshots, are supported only with CSI drivers. Also, many of the in-tree plugins do not support [dynamic provisioning](/kubernetes-engine/docs/concepts/persistent-volumes). When using a driver that does not support dynamic provisioning, you must manually create PersistentVolumes for your workloads.\n\nWhat's next?\n------------\n\n- Learn how to [Use StorageClasses with your workloads](/kubernetes-engine/multi-cloud/docs/aws/how-to/storage-class).\n- [Use a pre-existing EBS volume](/kubernetes-engine/multi-cloud/docs/aws/how-to/preexisting-volume).\n- Learn about [Persistent volumes and dynamic provisioning](/kubernetes-engine/docs/concepts/persistent-volumes) in GKE.\n- Learn how to [Snapshot a PersistentVolume](/kubernetes-engine/multi-cloud/docs/aws/how-to/snapshot-persistentvolume).\n- Read the Kubernetes [Storage Classes](https://kubernetes.io/docs/concepts/storage/storage-classes/) documentation.\n- Read the [Container Storage Interface (CSI) for Kubernetes GA](https://kubernetes.io/blog/2019/01/15/container-storage-interface-ga/) release announcement."]]