Join GitHub today
Issue with /docs/tasks/configure-pod-container/configure-persistent-volume-storage/ #2803
This is a...
With the existing pvc config, the current version of minikube is automatically provisioning a new volume and ignoring the manually created one with the its index.html file in it.
This then causes the pod to mount the incorrect volume and the rest of the example doesn't work
e.g. end up seeing
Instead of what I should be seeing, which is:
This worked for me when I tried it about two weeks ago. The minikube provision config is as default (as it was before), but I have picked up new versions of minikube and docker, my guess is that something in that set of updates has changed the default provisioning policy.
Page to Update:
referenced this issue
Mar 14, 2017
I'm not sure quite where the correct behaviour lies here i.e. is it the docs or a problem with minikube. Either way the example https://kubernetes.io/docs/tutorials/stateful-application/run-stateful-application/ might benefit from being updated to explain, or reference the correct thing to do with minikube.
Thanks, it looks like this behavior is a bit under-specified. GKE uses a different mechanism for dynamic provisioning right now. I created a cluster and don't see any storageclass objects:
$ kubectl get storageclass --all-namespaces
Which I think means it's going through this codepath: https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-controller-manager/app/plugins.go#L148
From the docs here it looks like users might have to explicitly disable dynamic provisioning:
I'll keep digging around.
I think what happens with the example in GKE is that because the PV is using the hostPath plugin (as opposed to GCEPersistentDisk), it ends up only being created on the node where the pod that is using it (via the claim) ends up (that's what it looked like when checked with
I've not really played with storageclass yet, but I would guess this might be the reason why kubectl get storageclass --all-namespaces does not showing the volumes, i.e. the disk space is just coming out of that already allocated to the nodes and visible with
Thanks for investigating this.
@dlorenc what version of Kubernetes was your GKE cluster on? In 1.5 and lower, GKE used an alpha dynamic provisioning feature that didn't use storage classes. However, in 1.6 GKE now installs a default storage class and beta dynamic provisioning is used.
I can confirm that in GKE with Kubernetes 1.6, the PVC in the current example gets a dynamically provisioned volume instead of getting bound to