When you request storage with a
PersistentVolumeClaim
(PVC), you can specify a StorageClass. If you do not specify a StorageClass, the
default StorageClass is used if one is configured in the cluster.
Google Distributed Cloud does not configure a default StorageClass. For example,
suppose you create a PVC that does not specify a StorageClass. The volume
controller will fulfill the claim according to the default StorageClass.
Change the default StorageClass
As a cluster administrator, you might want to change the default storage class.
Then all requests for storage that do not specify a StorageClass will be
fulfilled according to the StorageClass of your choice. This section gives the
steps for changing the default.
Deploy a new storage system
Deploy a new storage system and any software components for integrating the new
storage mechanism with a Kubernetes cluster. For example, you might need to
install a CSI driver
in the cluster.
Mark any existing default StorageClass as non-default
Search your cluster for any existing default StorageClass if one already exists
and mark it as non-default. For details, see
Change the default StorageClass.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[],[],null,["# Set the default StorageClass\n\nThis page shows how to set the default StorageClass for an\nGoogle Distributed Cloud cluster.\n\nOverview\n--------\n\nGoogle Distributed Cloud can integrate with block or file storage by using any of\nthe following mechanisms:\n\n- [Kubernetes in-tree volume plugins](https://kubernetes.io/docs/concepts/storage/volumes/#types-of-volumes)\n- [Container Storage Interface (CSI)](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/install-csi-driver)\n\nDefault StorageClass\n--------------------\n\nWhen you request storage with a\n[PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)\n(PVC), you can specify a StorageClass. If you do not specify a StorageClass, the\ndefault StorageClass is used if one is configured in the cluster.\nGoogle Distributed Cloud does not configure a default StorageClass. For example,\nsuppose you create a PVC that does not specify a StorageClass. The volume\ncontroller will fulfill the claim according to the default StorageClass.\n\nChange the default StorageClass\n-------------------------------\n\nAs a cluster administrator, you might want to change the default storage class.\nThen all requests for storage that do not specify a StorageClass will be\nfulfilled according to the StorageClass of your choice. This section gives the\nsteps for changing the default.\n\n### Deploy a new storage system\n\nDeploy a new storage system and any software components for integrating the new\nstorage mechanism with a Kubernetes cluster. For example, you might need to\n[install a CSI driver](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/install-csi-driver)\nin the cluster.\n\n### Mark any existing default StorageClass as non-default\n\nSearch your cluster for any existing default StorageClass if one already exists\nand mark it as non-default. For details, see\n[Change the default StorageClass](https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/).\n\n### Create a new StorageClass\n\n[Create a manifest for a new StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/).\nInclude the `storageclass.kubernetes.io/is-default-class: \"true\"` annotation.\nFor example: \n\n```\napiVersion: storage.k8s.io/v1\nkind: StorageClass\nmetadata:\n annotations:\n storageclass.kubernetes.io/is-default-class: \"true\"\n ...\n name: my-storage-class\n ...\nparameters:\n ...\nprovisioner: [MY_PROVISIONER]\n...\n```\n\nSave your manifest as a YAML file, and create the new StorageClass: \n\n```\nkubectl --kubeconfig [CLUSTER_KUBECONFIG] apply -f [MANIFEST_FILE]\n```\n\nwhere \u003cvar translate=\"no\"\u003e[MANIFEST_FILE]\u003c/var\u003e is the path to your new StorageClass manifest\nfile.\n\nWhat's next\n-----------\n\n- [Read about Google Distributed Cloud's storage concepts](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/storage)\n\n- [Install a CSI driver](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/install-csi-driver)"]]