VMware용 Google Distributed Cloud(소프트웨어 전용)로 만든 사용자 클러스터에는 하나 이상의 StorageClass 객체가 있으며 그중 하나가 기본 StorageClass로 지정됩니다.
이 페이지에서는 사용자 클러스터에 대해 기본 StorageClass를 설정하는 방법을 보여줍니다. 자세한 내용은 스토리지를 참조하세요.
이 페이지는 스토리지 성능, 사용량, 비용을 구성 및 관리하는 스토리지 전문가를 대상으로 합니다. Google Cloud 콘텐츠에서 참조하는 일반적인 역할과 예시 태스크에 대한 자세한 내용은 일반 GKE Enterprise 사용자 역할 및 작업을 참조하세요.
기본 StorageClass 찾기
모든 StorageClass를 나열합니다.
kubectl --kubeconfig USER_CLUSTER_KUBECONFIG get storageclasses
출력에서 어떤 StorageClass가 기본인지 확인할 수 있습니다. 예를 들어 다음 출력에서 standard-rwo라는 StorageClass가 기본 StorageClass임을 확인할 수 있습니다.
standard kubernetes.io/vsphere-volume
standard-rwo (default) csi.vsphere.vmware.com
스토리지를 요청할 때 StorageClass를 지정할 수 있습니다. StorageClass를 지정하지 않으면 기본 StorageClass가 사용됩니다. 예를 들어 StorageClass를 지정하지 않는 PersistentVolumeClaim을 만든다고 가정해 보겠습니다. 볼륨 컨트롤러는 기본 StorageClass에 따라 클레임을 처리합니다.
기본 StorageClass 변경
클러스터 관리자는 기본 스토리지 클래스를 변경할 수 있습니다.
그러면 StorageClass를 지정하지 않은 모든 스토리지 요청이 선택한 StorageClass에 따라 처리됩니다. 이 섹션에서는 기본값을 변경하는 단계를 설명합니다.
새 스토리지 시스템 배포
새 스토리지 시스템과 Kubernetes 클러스터와 통합하기 위한 모든 소프트웨어 구성요소를 배포합니다. 예를 들어 클러스터에 CSI 드라이버를 설치해야 할 수 있습니다.
이 단계는 사용 중인 스토리지 공급업체에 따라 다릅니다. CSI 드라이버의 경우 공급업체는 CSI 드라이버를 Kubernetes 클러스터에 배포하는 방법을 제공해야 합니다. CSI 드라이버 문서에는 프로비저닝 도구 이름을 포함하여 StorageClass에 제공하는 드라이버 관련 매개변수가 포함되어야 합니다.
새 어플라이언스에 대한 StorageClass를 만들 때 StorageClass의 이름은 이면의 특정 드라이버나 어플라이언스가 아니라 속성(예: 'fast' 또는 'highly-replicated')의 이름을 따라 지정해야 합니다.
이렇게 하면 클러스터와 환경 전반에서 일관된 스토리지 정책을 사용할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-19(UTC)"],[],[],null,["A user cluster created with Google Distributed Cloud (software only) for VMware has one\nor more\n[StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/)\nobjects, and one of them is designated as the default StorageClass.\nThis page shows how to set the default StorageClass for a user cluster. For more\ninformation, see [Storage](/kubernetes-engine/distributed-cloud/vmware/docs/concepts/storage).\n\nThis page is for Storage specialists who configure and manage storage\nperformance, usage, and expense. To learn more about common roles and example\ntasks that we reference in Google Cloud content, see\n[Common GKE user roles and tasks](/kubernetes-engine/enterprise/docs/concepts/roles-tasks).\n\nFind the default StorageClass\n\nList all the StorageClasses:\n\n```\nkubectl --kubeconfig USER_CLUSTER_KUBECONFIG get storageclasses\n```\n\nIn the output, you can see which StorageClass is the default. For example, in\nthe following output, you can see that a StorageClass named `standard-rwo` is\nthe default StorageClass:\n\n```\nstandard kubernetes.io/vsphere-volume\nstandard-rwo (default) csi.vsphere.vmware.com\n```\n\nWhen you request storage, you can specify a StorageClass. If you do not specify\na StorageClass, the default StorageClass is used. For example, suppose you\ncreate a\n[PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)\nthat does not specify a StorageClass. The volume controller will fulfill the\nclaim according to the default StorageClass.\n\nChanging the default StorageClass\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\nDeploy 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/vmware/docs/how-to/install-csi-driver) in the\ncluster.\n\nThis step depends on the storage vendor you're using. For CSI drivers, vendors\nshould provide instructions for deploying their CSI driver to a Kubernetes\ncluster. A CSI driver's documentation should also include the\n[driver-specific parameters](https://kubernetes.io/docs/concepts/storage/storage-classes/#the-storageclass-resource)\nthat you provide in your StorageClass, including the provisioner name.\n\nWhen you create a StorageClass for your new appliance, you should name the\nStorageClass after its properties (such as \"fast\" or \"highly-replicated\"),\nrather than after the name of the specific driver or appliance behind it.\nThis will make it easier to have consistent storage policies across clusters and\nenvironments.\n\nRemove the default annotation from the default StorageClass\n\nOpen the default StorageClass in a text editor:\n\n```\nkubectl --kubeconfig [USER_CLUSTER_KUBECONFIG] edit storageclass \\\n DEFAULT_STORAGE_CLASS\n```\n\nIn the text editor, remove the\n`storageclass.kubernetes.io/is-default-class: \"true\"` annotation. Close the\ntext editor.\n\nTo verify that the annotation was removed, enter this command:\n\n```\nkubectl --kubeconfig [USER_CLUSTER_KUBECONFIG] get storageclass \\\n DEFAULT_STORAGE_CLASS --output yaml\n```\n\nCreate 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- [Read about Google Distributed Cloud's storage concepts](/kubernetes-engine/distributed-cloud/vmware/docs/concepts/storage)\n\n- [Install a CSI driver](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/install-csi-driver)"]]