persistentvolume (5) 썸네일형 리스트형 [Kubernetes]How to use PV and PVC in kubernetes with GKE 목표 Google Cloud 영구 디스크(동적으로 만들어진 항목 또는 기존 항목)로 사용할 PersistentVolume(PV) 및 PersistentVolumeClaim(PVC)에 대한 매니페스트 만들기 Google Cloud 영구 디스크 PVC를 파드의 볼륨으로 마운트하기 매니페스트를 사용하여 StatefulSet 만들기 Google Cloud 영구 디스크 PVC를 StatefulSet의 볼륨으로 마운트하기 파드가 중지되었다가 다시 시작될 때 StatefulSet의 파드와 특정 PV의 연결 확인하기 작업 1. PVC, PV 만들기 Cluister API access 설정 gcloud container clusters get-credentials standard-cluster-1 --zone us-ce.. [Kubernetes]Dynamic provisioning failure in Kubernetes Problem Dynamic provisioning시 provisioner pod에서 아래와 같은 에러 메시지와 함께 PVC가 pending 상태가 된다. “unexpected error getting claim reference: selfLink was empty, can't make reference” k logs nfs-pod-provisioner-5948549f8c-46h4h I0330 01:31:27.061484 1 controller.go:987] provision "default/test-dynamic-nfs-pvc" class "joins-nfs-storageclass": started E0330 01:31:27.068286 1 controller.go:1004] provision "def.. [Kubernetes]Dynamic Provisioning with NFS in Kubernetes Purpose PVC를 생성할 때 PV 가 자동으로 생성되는 Dynamic Provisioning 을 NFS 기반으로 운영 1. Create Service Account - API 인증 구성 provisioner가 사용할 Service Account(nfs-pod-provisioner-sa)를 만들어 ClusterRole을 통해 pv와 pvc에 [get, list, watch, create, delete] 권한을 가질 수 있도록 API 인증을 구성 kind: ServiceAccount apiVersion: v1 metadata: name: nfs-pod-provisioner-sa --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadat.. [Kubernetes]How to create pv and pvc in kubernetes 아래 템플릿을 사용하여 hostpath pv,pvc 를 생성할 수 있다. PersistentVolume Template pv-hostpath.yaml apiVersion: v1 kind: PersistentVolume metadata: name: pv-hostpath spec: capacity: storage: 2Gi #1 스토리지 용량 volumeMode: Filesystem #2 accessModes: #3 - ReadWriteOnce storageClassName: manual #4 persistentVolumeReclaimPolicy: Delete #5 hostPath: #6 path: /data/storage/test-pv [dewble@instance-1 volume]$ kubectl -f a.. [Kubernetes]What are PV and PVC in Kubernetes? Concept PersistentVolume A piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes. 퍼시스턴트볼륨 (PV)은 관리자가 프로비저닝 하거나 스토리지 클래스를 사용하여 동적으로 프로비저닝 한 클러스터의 스토리지이다. 노드가 클러스터 리소스인 것처럼 PV는 클러스터 리소스이다. PV는 Volumes와 같은 볼륨 플러그인이지만, PV를 사용하는 개별 파드와는 별개의 라이프사이클을 가진다. 이 API 오브젝트는 NFS, iSCSI 또는 클라우드 공급자별 스토리지 시스템 등 스토리지 구현에 대한 세부 정보를 담아낸다. Pers.. 이전 1 다음