Minikube PVC 바인딩

2025. 1. 1. 19:52카테고리 없음

PVC

storageClassName: standard이면 PV를 별도로 지정하지 않아도 됨

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: temp-pvc
  namespace: temp
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  storageClassName: standard  # Use the default storage class in Minikube

Deployment

    spec:
      containers:
      - name: temp
        image: {url}/{image}:{tag}
        ports:
        - containerPort: {port}
        volumeMounts:
        - name: upload
          mountPath: /temp
      volumes:
      - name: upload
        persistentVolumeClaim:
          claimName: temp-pvc  # Use the pre-created PVC