-
Notifications
You must be signed in to change notification settings - Fork 985
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
PersistentVolumeClaim remains in Pending state #74
Comments
I'm facing a similar issue on Azure, but I believe it's related to the storage class name on the persistent volume that terraform creates (the empty string). Because the storage class names don't match the PVC fails to bind to the PV. Could this be your problem (the storage class names don't match)? There doesn't seem to be a way to specify the storage class name on the PV, while the PVC resource storage class name defaults to "default". When I manually edited the PV storage class name using kubectl from "" -> "default" then the PVC successfully bound to the PV. |
I just hit the same problem on Google, and agree with @sam-at-luther's diagnosis. |
Agree with @sam-at-luther There are workarounds and solutions in these issues, but they only work if you can make the changes in kubernetes config, but since terraform doesn't allow you to specify the storage class on the volume, they won't work. kubernetes/minikube#214 |
I have the same issue. But I don't understand, why terraform doesn't allow to specify storage class name on the persistent volume. Is there any reason for that? |
@plispe I looked at the code, it's just a matter of adding the entry (which I would do if my go coding was up to it). Terraform explicitly maps parameters to the underlying drivers, so it cannot simply pass parameters it doesn't explicitly handle. |
@dionjwa Thank you, I will try to make a pull request with the solution. I wrote already the code, but now I am trying to find how I should test the updated provider. |
plispe There is already a pull request with a fix: #72 |
@ccope ok I will wait for merge and release. Thank you. |
Hi all any updates on this issue? |
Hi folks, The good news is that #111 which is fixing this bug was merged and will be part of the upcoming release which should come out 🔜. Also #125 has improved the event log polling which should hopefully reduce any time needed to debug such issue. |
When I try to create PV & PVC in Kubernetes with Terraform targeting a specific existing EBS volume the PVC never gets bound. It looks the PV created using Terraform does not create it in correct manner that it can be successfully bound.
Terraform Version
Terraform v0.10.7
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/puco/23487f4d80001f3d44a41a48b53504cf
Expected Behavior
I should have a PV & bound PVC
Actual Behavior
I have a PV in Available state and PVC in Pending state
Steps to Reproduce
terraform apply
Important Factoids
Run of the mill Kubernetes 1.8 cluster w/o RBAC on AWS provisioned with kops. I created the EBS volume manually (as that part works w/o any issues).
What works
When I create the PV/PVC with kubectl directly they work. When I create the PV with terraform and PVC with kubectl it works as well, so there appears to be something wrong with the PV. I compared the definition (yaml) of both PVs (tf and kubectl) and there appears not to be any issues. Originally I assumed that the issue would be creating EBS volume, PV and PVC in one go but the issue still remains with an existing EBS volume.
The text was updated successfully, but these errors were encountered: