didnt find persistent volumes to bind when attempting to assign to local storage on a pi didnt find persistent volumes to bind when attempting to assign to local storage on a pi kubernetes kubernetes

didnt find persistent volumes to bind when attempting to assign to local storage on a pi


There were 2 things here to learn.

  1. Master nodes do not get scheduled pods. They have enough going on, just organizing. That being said, A since node cluster is both a Master and Slave, where as 2 or more, 1 is a Master and rest are Slaves.

  2. When assigning the path /hello/world for the volume in this case, it will not make the path automatically on the host, which is actually REALLY annoying because if you have N pods, you need ALL Nodes to have that path, in case it is scheduled to a different one. The master determines where things so, so if it passes it to a Node which cant handle it, it will get a backoff error. It is best to put the path on all nodes then.

The key takeaway is that the cluster (master or otherwise) should auto make Node Paths, which just isnt true. One would think that since it has sudo it should be able to say "Mount this here", but doesnt. I need to manually configure each Node to have the paths consumed, which creates provisioning errors.

If i need to spin up MORE nodes ad-hoc, I need to ensure they are all provisioned accordingly, such as adding this particular path. you will need to add that to your own set up routine.

You can read more about hostPath for Volumes here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolume

Websites state that hostPath is good for single node clusters, but when dealing with Production or >1 Nodes, you should use NFS or Some other mechanism for storage.

Something else which would benefit would be using Storage Classes for auto provisioning, which is why I personally wanted in the first place: https://kubernetes.io/blog/2016/10/dynamic-provisioning-and-storage-in-kubernetes/

It talks about how you define storage classes, as well as how to request storage size of 30gi for example. This will be used with the claim instead. It is too late, but i will attempt to write up a similar example for the base question.