이 페이지에서는 Google Kubernetes Engine (GKE) Standard 클러스터에 컨테이너 스토리지 인터페이스(CSI) 스토리지 드라이버를 설치하는 방법을 설명합니다. 이 페이지는 Compute Engine 영구 디스크 CSI 드라이버를 자동으로 사용하는 GKE Autopilot 클러스터에 적용되지 않습니다.
CSI는 Kubernetes가 컨테이너화된 워크로드에 임의의 스토리지 시스템을 노출할 수 있게 해주는 개방형 표준 API입니다. Kubernetes 볼륨은 과거에 Kubernetes 바이너리로 컴파일한 공급업체별 스토리지 드라이버에서 관리합니다.
이전에는 Kubernetes에 포함되지 않은 스토리지 드라이버를 사용할 수 없었습니다. CSI 드라이버를 설치하면 Kubernetes에서 기본적으로 지원되지 않는 스토리지 시스템에 대한 지원이 추가됩니다. 또한 CSI를 사용하면 스냅샷 및 크기 조절과 같은 최신 스토리지 기능을 사용할 수 있습니다.
공급업체의 CSI 드라이버 설치
다른 스토리지 공급업체는 자체 CSI 드라이버를 개발하며, 설치 안내를 제공할 책임이 있습니다. 간단한 경우에는 매니페스트를 클러스터에 배포하는 것만으로 설치할 수 있습니다. CSI 문서의 CSI 드라이버 목록을 참조하세요.
드라이버 설치 확인
CSI 드라이버를 설치한 후 클러스터의 GKE 버전에 따라 다음 명령어 중 하나를 실행하여 설치를 확인할 수 있습니다.
CSI 드라이버 문서에는 프로비저닝 도구 이름을 포함하여 StorageClass에 제공하는 드라이버 관련 매개변수가 포함되어야 합니다.
StorageClass의 이름은 특정 드라이버나 어플라이언스의 이름이 아니라 속성의 이름을 따라 지정해야 합니다. StorageClass의 속성을 따라 이름을 지정하면 여러 클러스터 및 환경에서 같은 이름의 StorageClass를 만들 수 있고 애플리케이션이 클러스터 전체에서 동일한 속성을 가진 스토리지를 가져올 수 있습니다.
예시: StatefulSet의 StorageClass 참조
다음 예시에서는 StorageClass에서 CSI 드라이버를 정의하고 StatefulSet 워크로드에서 StorageClass를 참조하는 방법을 모델링합니다. 이 예시에서는 드라이버가 이미 클러스터에 설치되어 있다고 가정합니다.
다음은 가상의 CSI 드라이버 csi.example.com을 프로비저닝 도구로 사용하는 premium-rwo라는 간단한 StorageClass입니다.
# fast-sc.yamlapiVersion: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을 사용하여 안정적인 스토리지를 제공합니다.
Kubernetes는 StorageClass에 정의된 프로비저닝 도구를 호출하여 새 스토리지 볼륨을 만듭니다. 이 경우 Kubernetes는 제공업체의 API를 호출하는 가상의 csi.example.com 제공업체를 호출하여 볼륨을 만듭니다. 볼륨이 프로비저닝되면 Kubernetes가 자동으로 PersistentVolume을 생성하여 스토리지를 나타냅니다.
다음은 StorageClass를 참조하는 간단한 StatefulSet입니다.
# statefulset.yamlapiVersion: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:premium-rwo# 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-08-08(UTC)"],[],[],null,["# Manually install a CSI driver\n\n[Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nThis page explains how to install a Container Storage Interface (CSI) storage\ndriver on Google Kubernetes Engine (GKE) Standard clusters. This page\ndoesn't apply to GKE Autopilot clusters, which\nautomatically use the\n[Compute Engine persistent disk CSI driver](/kubernetes-engine/docs/how-to/persistent-volumes/gce-pd-csi-driver#using_the_for_linux_clusters).\n\nIf you are using the\n[Compute Engine persistent disk CSI driver](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver) in your\nStandard cluster, we recommend\n[automatically deploying the driver](/kubernetes-engine/docs/how-to/persistent-volumes/gce-pd-csi-driver)\nto reduce your management overhead.\n\nOverview\n--------\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. Kubernetes volumes are managed by\nvendor-specific storage drivers, which have historically been\n[compiled into Kubernetes binaries](https://kubernetes.io/docs/concepts/storage/volumes/#types-of-volumes).\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| **Note:** Google Distributed Cloud 1.5 does not support Kubernetes CSI snapshots.\n\nInstalling a vendor's CSI driver\n--------------------------------\n\nOther storage 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, other vendors' drivers.\n\nVerifying a driver installation\n-------------------------------\n\nAfter you install a CSI driver, you can verify the installation by running one\nof the following commands, depending on your cluster's GKE\nversion: \n\n### 1.14+\n\n```\nkubectl get csinodes \\\n-o jsonpath='{range .items[*]} {.metadata.name}{\": \"} {range .spec.drivers[*]} {.name}{\"\\n\"} {end}{end}'\n```\n\n### 1.13.x\n\n```\nkubectl get nodes \\\n-o jsonpath='{.items[*].metadata.annotations.csi\\.volume\\.kubernetes\\.io\\/nodeid}'\n```\n\nUsing a CSI driver\n------------------\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, if a StorageClass is\n not created for you as part of driver installation. Some CSI drivers deploy\n a StorageClass when you install them.\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](https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/).\n\n### Considerations 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\n### Example: 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\nThe following is a simple StorageClass named `premium-rwo` that uses a fictional\nCSI driver, `csi.example.com`, as its provisioner: \n\n # fast-sc.yaml\n apiVersion: storage.k8s.io/v1\n kind: StorageClass\n metadata:\n name: premium-rwo\n provisioner: csi.example.com # CSI driver\n parameters: # You provide vendor-specific parameters to this specification\n type: example-parameter # Be sure to follow the vendor's instructions\n datastore: my-datastore\n reclaimPolicy: Retain\n allowVolumeExpansion: true\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.\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 PersistentVolume to\nrepresent the storage.\n\nHere is a simple StatefulSet that references the StorageClass: \n\n # statefulset.yaml\n apiVersion: apps/v1\n kind: StatefulSet\n metadata:\n name: web\n spec:\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: premium-rwo # This field references the existing StorageClass\n\nWhat's next\n-----------\n\n- Learn more about GKE [storage concepts](/kubernetes-engine/docs/concepts/storage-overview)."]]