-
Notifications
You must be signed in to change notification settings - Fork 159
Open
@agnoam
Description
Hey,
I'm trying to make a deployment with a local persistent volume attached to it. (for development)
I managed to do this on Linux like Kubernetes declarations below.
I tried the C:\ format in hostPath.path but, it seems Kubernetes not support this.
Does anyone know how to make this work on Windows ?
Kubernetes declarations
Volume declaration
apiVersion: v1 kind: PersistentVolume metadata: name: test-volume labels: type: local spec: storageClassName: hostpath capacity: storage: 2Gi accessModes: - ReadWriteOnce hostPath: path: "/home/k8s/myTestVolume" type: DirectoryOrCreate --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: test-volume-claim spec: storageClassName: hostpath accessModes: - ReadWriteOnce resources: requests: storage: 2Gi
Deployment declaration
apiVersion: apps/v1 kind: Deployment metadata: name: test-app spec: selector: matchLabels: app: test-app template: metadata: labels: app: test-app spec: volumes: - name: test-storage persistentVolumeClaim: claimName: test-volume-claim securityContext: {} containers: - name: test-container image: busybox securityContext: privileged: true volumeMounts: - mountPath: /home/data name: test-storage
Metadata
Metadata
Assignees
Labels
No labels