New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with /docs/tasks/configure-pod-container/configure-persistent-volume-storage/ #2803
Comments
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. |
So I think that this is the "correct" behavior, but it definitely did change. What happens if you try this example in something like GKE instead of minikube? |
In GKE, the example as it currently stands, i.e. without the annotation, seems to work correctly with the pvc correctly binding to the expected pv and no unexpected pv's being dynamically created. |
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 |
When binding to a manually created PersistentVolume, the claim must disable dynamic provisioning by specifying an empty storage class. Fixes kubernetes#2803
When binding to a manually created PersistentVolume, the claim must disable dynamic provisioning by specifying an empty storage class. Fixes kubernetes#2803
* update pod persistent volume example storage class When binding to a manually created PersistentVolume, the claim must disable dynamic provisioning by specifying an empty storage class. Fixes #2803 * use specific storageclass * revert gibibytes -> gigabytes change
This is a...
Problem:
The example no longer works with minikube version v0.17.1
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.
Proposed Solution:
The example can be got going again by telling the system not to automatically provision with the empty storage class annotation in the pvc, e.g.
Page to Update:
http://kubernetes.io/...
--Kubernetes Version:
kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:"08e099554f3c31f6e6f07b448ab3ed78d0520507", GitTreeState:"clean", BuildDate:"2017-01-12T04:57:25Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.3", GitCommit:"029c3a408176b55c30846f0faedf56aae5992e9b", GitTreeState:"clean", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"
The text was updated successfully, but these errors were encountered: