Sign inSign up

djh00t/hostpath-provisioner

By djh00t

Updated over 3 years ago

Image
0

961

djh00t/hostpath-provisioner repository overview

Dynamic Provisioning of Kubernetes HostPath Volumes

This repo contains a fork of github.com/rimusz/hostpath-provisioner

A tool to dynamically provision Kubernetes HostPath Volumes in single-node Kubernetes cluster as kind.

It is based on kubernetes-sigs/sig-storage-lib-external-provisioner/hostpath-provisioner example project.

TL;DR

# install dynamic hostpath provisioner Helm chart
helm repo add rimusz https://charts.rimusz.net
helm repo update
helm upgrade --install hostpath-provisioner --namespace kube-system rimusz/hostpath-provisioner
# create a test-pvc and a pod writing to it
kubectl create -f https://raw.githubusercontent.com/rimusz/hostpath-provisioner/master/deploy/test-claim.yaml
kubectl create -f https://raw.githubusercontent.com/rimusz/hostpath-provisioner/master/deploy/test-pod.yaml

# docker exec to kind node
docker exec -it container_id bash
# expect a folder to exist on your host
ls -alh /mnt/hostpath/pvc-*/

kubectl delete test-pod
kubectl delete pvc hostpath-pvc

# expect the folder to be removed from your host
ls -alh /mnt/hostpath/pvc-*/

Additional Environment Variables

NODE_HOST_PATH - Use this to set a custom directory as your hostpath mount point. If blank, uses default /mnt/hostpath

Tag summary

Content type

Image

Digest

sha256:94928720b

Size

5.6 MB

Last updated

over 3 years ago

docker pull djh00t/hostpath-provisioner