.gitlab-ci.yml
Local Path Provisioner
Overview
Local Path Provisioner provides a way for the Kubernetes users to utilize the local storage in each node. Based on the user configuration, the Local Path Provisioner will create hostPath
based persistent volume on the node automatically. It utilizes the features introduced by Kubernetes Local Persistent Volume feature, but make it a simpler solution than the built-in local
volume feature in Kubernetes.
Compare to built-in Local Persistent Volume feature in Kubernetes
Pros
Dynamic provisioning the volume using host path.
- Currently the Kubernetes Local Volume provisioner cannot do dynamic provisioning for the host path volumes.
Cons
- No support for the volume capacity limit currently.
- The capacity limit will be ignored for now.
- Only support
hostPath
Requirement
Kubernetes v1.12+.
Deployment
Installation
In this setup, the directory /opt/local-path-provisioner
will be used across all the nodes as the path for provisioning (a.k.a, store the persistent volume data). The provisioner will be installed in local-path-storage
namespace by default.
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
After installation, you should see something like the following:
$ kubectl -n local-path-storage get pod
NAME READY STATUS RESTARTS AGE
local-path-provisioner-d744ccf98-xfcbk 1/1 Running 0 7m
Check and follow the provisioner log using:
$ kubectl -n local-path-storage logs -f local-path-provisioner-d744ccf98-xfcbk