이 페이지에서는 VMware용 Google Distributed Cloud(소프트웨어만 해당)를 사용하여 만든 클러스터에 컨테이너 스토리지 인터페이스(CSI) 스토리지 드라이버를 설치하는 방법을 설명합니다.
개요
CSI는 Kubernetes가 컨테이너화된 워크로드에 임의의 스토리지 시스템을 노출할 수 있게 해주는 개방형 표준 API입니다. 클러스터에 CSI 호환 스토리지 드라이버를 배포하면 vSphere 스토리지를 거치지 않고도 클러스터를 호환 스토리지 기기에 직접 연결할 수 있습니다.
Kubernetes 볼륨은 공급업체별 스토리지 드라이버에서 관리합니다(과거에는 Kubernetes 바이너리로 컴파일 처리함).
이전에는 Kubernetes에 포함되지 않은 스토리지 드라이버를 사용할 수 없었습니다. CSI 드라이버를 설치하면 Kubernetes에서 기본적으로 지원되지 않는 스토리지 시스템에 대한 지원이 추가됩니다. 또한 CSI를 사용하면 스냅샷 및 크기 조절과 같은 최신 스토리지 기능을 사용할 수 있습니다.
기본적으로 Google Distributed Cloud는 기본 제공되는 vsphereVolume 드라이버를 사용하여 vSphere Datastore를 사용합니다. 또한 기본 제공되는 NFS 및 iSCSI용 드라이버는 기존 볼륨을 워크로드에 연결하고 마운트할 수 있습니다.
공급업체의 CSI 드라이버 설치
스토리지 공급업체는 자체 CSI 드라이버를 개발하며 설치 안내를 제공할 책임이 있습니다. 간단한 경우에는 매니페스트를 클러스터에 배포하는 것만으로 설치할 수 있습니다. CSI 문서의 CSI 드라이버 목록을 참조하세요.
CSI 드라이버 문서에는 프로비저닝 도구 이름을 포함하여 StorageClass에 제공하는 드라이버 관련 매개변수가 포함되어야 합니다.
StorageClass의 이름은 특정 드라이버나 어플라이언스의 이름이 아니라 속성의 이름을 따라 지정해야 합니다. StorageClass의 속성을 따라 이름을 지정하면 여러 클러스터 및 환경에서 같은 이름의 StorageClass를 만들 수 있고 애플리케이션이 클러스터 전체에서 동일한 속성을 가진 스토리지를 가져올 수 있습니다.
예시: StatefulSet의 StorageClass 참조
다음 예시에서는 StorageClass에서 CSI 드라이버를 정의하고 StatefulSet 워크로드에서 StorageClass를 참조하는 방법을 모델링합니다. 이 예시에서는 드라이버가 이미 클러스터에 설치되어 있다고 가정합니다.
다음은 가상의 CSI 드라이버 csi.example.com을 프로비저닝 도구로 사용하는 premium-rwo라는 간단한 StorageClass입니다.
fast-sc.yaml
apiVersion:storage.k8s.io/v1kind:StorageClassmetadata:name:premium-rwoprovisioner:csi.example.com# CSI driverparameters:# You provide vendor-specific parameters to this specificationtype:example-parameter# Be sure to follow the vendor's instructionsdatastore:my-datastorereclaimPolicy:RetainallowVolumeExpansion:true
StatefulSet의 volumeClaimTemplates 사양에서 StorageClass를 참조하면 Kubernetes는 PersistentVolume(PV)을 사용하여 안정적인 스토리지를 제공합니다.
Kubernetes는 StorageClass에 정의된 프로비저닝 도구를 호출하여 새 스토리지 볼륨을 만듭니다. 이 경우 Kubernetes는 제공업체의 API를 호출하는 가상의 csi.example.com 제공업체를 호출하여 볼륨을 만듭니다. 볼륨이 프로비저닝되면 Kubernetes가 자동으로 PV를 생성하여 스토리지를 나타냅니다.
다음은 StorageClass를 참조하는 간단한 StatefulSet입니다.
statefulset.yaml
apiVersion:apps/v1kind:StatefulSetmetadata:name:webspec:replicas:2selector:matchLabels:app:nginxtemplate:metadata:labels:app:nginxspec:containers:-name:nginximage:registry.k8s.io/nginx-slim:0.8volumeMounts:-name:wwwmountPath:/usr/share/nginx/htmlvolumeClaimTemplates:# This is the specification in which you reference the StorageClass-metadata:name:wwwspec:accessModes:["ReadWriteOnce"]resources:requests:storage:1GistorageClassName:fast# This field references the existing StorageClass
[[["이해하기 쉬움","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-09-04(UTC)"],[],[],null,["This page explains how to install a Container Storage Interface (CSI) storage\ndriver to clusters created using Google Distributed Cloud (software only) for VMware.\n\nOverview\n\n[CSI](https://github.com/container-storage-interface/spec/blob/master/spec.md)\nis an open standard API that enables Kubernetes to expose arbitrary storage\nsystems to containerized workloads. When you deploy a CSI-compatible storage\ndriver to a cluster, the cluster can connect directly to a compatible storage\ndevice without having to go through vSphere storage.\n\nKubernetes volumes are managed by vendor-specific storage drivers, which have\nhistorically been\n[compiled into Kubernetes binaries](https://kubernetes.io/docs/concepts/storage/).\nPreviously, you could not use a storage driver that was not included with\nKubernetes. Installing a CSI driver adds support for a storage system that is\nnot natively supported by Kubernetes. Also, CSI enables the use of modern\nstorage features, such as snapshots and resizing.\n\nTo use a CSI driver, you need to create a Kubernetes\n[StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/).\nYou set the CSI driver as the provisioner for the StorageClass. Then, you can\n[set the StorageClass as the cluster's default](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/default-storage-class),\nor configure your workloads to use the StorageClass ([StatefulSet example](#example_statefulset)).\n\nBefore you begin\n\nBy default, Google Distributed Cloud uses vSphere datastores using the built-in\n[vsphereVolume](https://kubernetes.io/docs/concepts/storage/volumes/#vspherevolume)\ndriver. Additionally, the built-in drivers for NFS and iSCSI can attach and\nmount existing volumes to your workloads.\n| **Note:** The built-in [NFS](https://kubernetes.io/docs/concepts/storage/volumes/#nfs) and [iSCSI](https://kubernetes.io/docs/concepts/storage/volumes/#iscsi) drivers cannot provision new volumes. For dynamic provisioning, you need a CSI storage driver specific to your storage appliance.\n\nInstalling a vendor's CSI driver\n\nStorage vendors develop their own CSI drivers, and they are responsible for\nproviding installation instructions. In simple cases, installation might only\ninvolve deploying manifests to your clusters. See the list of [CSI\ndrivers](https://kubernetes-csi.github.io/docs/drivers.html) in the\nCSI documentation.\n| **Note:** Google does not provide support for, nor instructions for installing, vendors' drivers.\n\nVerifying a driver installation\n\nAfter you install a CSI driver, you can verify the installation by running the\nfollowing command:\n\n```\nkubectl get csidrivers --kubeconfig KUBECONFIG\n```\n\nUsing a CSI driver\n\nTo use a CSI driver:\n\n1. Create a Kubernetes [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/)\n that references the driver in its `provisioner` field.\n\n2. To provision storage, you can either:\n\n - Reference the StorageClass in the `volumeClaimTemplates` specification for a [StatefulSet](/kubernetes-engine/docs/concepts/statefulset) object.\n - [Set it as the cluster's default StorageClass](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/default-storage-class).\n\nConsiderations for StorageClasses backed by a CSI driver\n\nWhen you create a StorageClass, consider the following:\n\n- CSI driver documentation should include the [driver-specific parameters](https://kubernetes.io/docs/concepts/storage/storage-classes/#the-storageclass-resource) that you provide to your StorageClass, including the provisioner name.\n- You should name the StorageClass after its properties, rather than after the name of the specific driver or appliance behind it. Naming the StorageClass after its properties allows you to create StorageClasses with the same name across multiple clusters and environments, and allows your applications to get storage with the same properties across clusters.\n\nExample: Reference StorageClass in a StatefulSet\n\nThe following example models how to define a CSI driver in a StorageClass, and\nthen reference the StorageClass in a [StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/)\nworkload. The example assumes the driver has already been installed to the\ncluster.\n\nBelow is a simple StorageClass named `premium-rwo` that uses a fictional CSI driver,\n`csi.example.com`, as its provisioner: \n\nfast-sc.yaml \n\n```yaml\napiVersion: storage.k8s.io/v1\nkind: StorageClass\nmetadata:\n name: premium-rwo\nprovisioner: csi.example.com # CSI driver\nparameters: # You provide vendor-specific parameters to this specification\n type: example-parameter # Be sure to follow the vendor's instructions\n datastore: my-datastore\nreclaimPolicy: Retain\nallowVolumeExpansion: true\n```\n\nYou reference the StorageClass in a StatefulSet's `volumeClaimTemplates`\nspecification.\n\nWhen you reference a StorageClass in a StatefulSet's `volumeClaimTemplates`\nspecification, Kubernetes provides stable storage using PersistentVolumes (PVs).\nKubernetes calls the provisioner defined in the StorageClass to create a new\nstorage volume. In this case, Kubernetes calls the fictional `csi.example.com`\nprovider, which calls out to the provider's API, to create a volume. After the\nvolume is provisioned, Kubernetes automatically creates a PV to represent the\nstorage.\n\nHere is a simple StatefulSet that references the StorageClass: \n\nstatefulset.yaml \n\n```yaml\napiVersion: apps/v1\nkind: StatefulSet\nmetadata:\n name: web\nspec:\n replicas: 2\n selector:\n matchLabels:\n app: nginx\n template:\n metadata:\n labels:\n app: nginx\n spec:\n containers:\n - name: nginx\n image: registry.k8s.io/nginx-slim:0.8\n volumeMounts:\n - name: www\n mountPath: /usr/share/nginx/html\n volumeClaimTemplates: # This is the specification in which you reference the StorageClass\n - metadata:\n name: www\n spec:\n accessModes: [ \"ReadWriteOnce\" ]\n resources:\n requests:\n storage: 1Gi\n storageClassName: fast # This field references the existing StorageClass\n```\n\nWhat's next\n\n- [Read more about Google Distributed Cloud storage concepts](/kubernetes-engine/distributed-cloud/vmware/docs/concepts/storage)\n- [Set a default StorageClass for your cluster](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/default-storage-class)"]]