Skip to content
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

Misleading example of static provisioning #784

Closed
jsafrane opened this issue Mar 9, 2021 · 1 comment · Fixed by #794
Closed

Misleading example of static provisioning #784

jsafrane opened this issue Mar 9, 2021 · 1 comment · Fixed by #794
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jsafrane
Copy link
Contributor

jsafrane commented Mar 9, 2021

/kind bug

What happened?
The example at https://github.com/kubernetes-sigs/aws-ebs-csi-driver/tree/master/examples/kubernetes/static-provisioning
uses StorageClass with volumeBindingMode: WaitForFirstConsumer. In this mode, a Pod + PVC is scheduled together and are assigned to a random node / zone. Scheduler does not take pre-existing unbound PVs into account here at all. Therefore a new empty PV may be provisioned for the PVC, leaving users confused.

What you expected to happen?

The example is hard to do right. Either a PV must exist in every AWS zone where cluster has a node, which is odd, or the StorageClass must use volumeBindingMode: Immediate, which may then break other cases where dynamic provisioning + topology is preferred. Does it make sense to have a dedicated StorageClass just for pre-provisioned PVs?

How to reproduce it (as minimally and precisely as possible)?

  1. Create a cluster with 3 AWS zones.
  2. Follow the example
  3. Sometimes, you get a dynamically provisioned PV instead of the pre-provisioned one.
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 9, 2021
@wongma7
Copy link
Contributor

wongma7 commented Mar 9, 2021

No, let's remove the StorageClass, I have only ever heard confusion about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants