This driver adds node-local storage capabilities to Kubernetes without relying on external service components. It supports dynamic provisioning of persistent volumes by creating a local file directory volume-id-data for the volume based on a PersistentVolumeClaim (PVC).
- CSI plugin name:
local-path.csi.joseph.io - Project status: Alpha
| Driver Version | Supported K8s Version | Status |
|---|---|---|
| master branch | 1.21+ | Alpha |
| v0.0.1 | 1.21+ | Alpha |
Install the driver in a Kubernetes cluster:
- Install by Helm charts
cd git-csi
helm install - Install by kubectl
cd git-csi
kubectl apply -f deploy- Basic usage, refer to example.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: example
spec:
storageClassName: local-path # The storage class is declared here in the PVC
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1G
----
Group policy
-
Snapshot
-
Volume cloning
-
Local Build
make build
-
Image Publishing
- Open the Makefile to modify it
.DEFAULT_GOLD:=run IMG_PRE=feature2017/local-path # Replace this with your prefix docker-build: docker build -t ${IMG_PRE}-controller:0.0.1 -f cmd/controller/Dockerfile --push . docker build -t ${IMG_PRE}-node:0.0.1 -f cmd/node/Dockerfile --push .
- Run the command
make docker-build
-
Deployment
- Modify the image source in the YAML files under the
deploydirectory
- name: local-path-controller image: [your-img-pre]/local-path-controller:0.0.1 imagePullPolicy: Always
- Modify the image source in the YAML files under the