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

Error following “Configure a Pod to Use a PersistentVolume for Storage”: storageclass.storage.k8s.io "manual" not found #30912

Open
winkee01 opened this issue Dec 14, 2021 · 24 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language sig/storage Categorizes an issue or PR as relevant to SIG Storage. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@winkee01
Copy link

Environment:

Kube cluster is running on local Lan.

Symptom

So I followed with the official tutorial about creating a PVC, but after I created PV and PVC, I got this error saying "manual" not found.

On that page it defines a StorageClass in PV's config file (listed below), I think this might be very confusing because there is no information about where this manual StorageClass comes from, is it a StorageClass already defined somewhere?, or we just declare a new one here.

apiVersion: v1
kind: PersistentVolume
metadata:
  name: task-pv-volume
  labels:
    type: local
spec:
  storageClassName: manual
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/data"

The error clearly says "manual" StorageClass is not found, when I query kubectl get storageclass, it says No resources found.

Can you make "manual" here more sense?

Another observation

After I delete PV and PVC, and recreate them, the error disappears, wow, I am even more confused.

@winkee01 winkee01 added the kind/support Categorizes issue or PR as a support question. label Dec 14, 2021
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Dec 14, 2021
@sftim
Copy link
Contributor

sftim commented Dec 14, 2021

/sig storage
/remove-kind support
/kind bug
/language en

Thanks for reporting this @winkee01

I think that page is out of date and does need fixing.

@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language and removed kind/support Categorizes issue or PR as a support question. labels Dec 14, 2021
@sftim
Copy link
Contributor

sftim commented Jan 5, 2022

/retitle Error following “Configure a Pod to Use a PersistentVolume for Storage”: storageclass.storage.k8s.io "manual" not found

@k8s-ci-robot k8s-ci-robot changed the title storageclass.storage.k8s.io "manual" not found Error following “Configure a Pod to Use a PersistentVolume for Storage”: storageclass.storage.k8s.io "manual" not found Jan 5, 2022
@Kartik494
Copy link
Contributor

Hi @winkee01 ,

Another observation

After I delete PV and PVC, and recreate them, the error disappears, wow, I am even more confused.

In my env i got the same error after recreating the pv and pvc . PV and PVC get created while i use a different name only even i don't have that SC in my env. I am looking into it. why it's this so.
Thanks

@Kartik494
Copy link
Contributor

@sftim for more clarification on this is this a good idea to add a note for SC ?

@sftim
Copy link
Contributor

sftim commented Feb 2, 2022

@Kartik494 perhaps you could explain your question more?

The page at https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/ is out of date, and we need to fix it. Someone can check that it is fixed by performing the task and observing that you can complete it without any issue.

@Kartik494
Copy link
Contributor

@sftim For new users it might seems confusing from where they are getting storage class named manual, i think we should add a note for clarification , but not sure on this

@quynhdang-vt
Copy link

Hi @winkee01 ,

Another observation

After I delete PV and PVC, and recreate them, the error disappears, wow, I am even more confused.

In my env i got the same error after recreating the pv and pvc . PV and PVC get created while i use a different name only even i don't have that SC in my env. I am looking into it. why it's this so. Thanks

SO did I -- deleting, uninstall, reinstall, redeployment still show the same error.

@winkee01
Copy link
Author

winkee01 commented Feb 5, 2022

Hi @winkee01 ,

Another observation

After I delete PV and PVC, and recreate them, the error disappears, wow, I am even more confused.

In my env i got the same error after recreating the pv and pvc . PV and PVC get created while i use a different name only even i don't have that SC in my env. I am looking into it. why it's this so. Thanks

I tried to delete PV & PVC, but unfortunately, I can create PV & PVC without error, thus not being able to recreate your errors. I don't know why. So, to my understanding at this point, if you specify a non-exist SC in PV, it virtually defines it, and you can specify it in PVC so that they can be bound. But I have no idea why the error says "manual not found". Very misleading and confusing error information.

@sftim
Copy link
Contributor

sftim commented Feb 7, 2022

When a page has a prerequisite, we should document it. For this task, I recommend that we cover how to set up any StorageClass that the task requires. The exception would be if we can direct readers to a different task and recommend that they follow the other task page first.

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 7, 2022
@Kartik494
Copy link
Contributor

@sftim Adding a page reference for how to create a storage class first is good direction to proceed?

@Kartik494
Copy link
Contributor

When a page has a prerequisite, we should document it. For this task, I recommend that we cover how to set up any StorageClass that the task requires. The exception would be if we can direct readers to a different task and recommend that they follow the other task page first.

I think there is already mentioning of creating a storage class in doc before creating PV.

@os6sense
Copy link

os6sense commented Apr 4, 2022

I'm also affected by this issue when trying to setup a hostpath based pv for local development. Actually understanding the problem is hard enough because this is the first hit on google and to my mind, no one has actually answered the original question.

My understand so far is that there isn't actually a StorageClass named "manual", rather the hostpath based PV is provisioned statically and "manual" is used purely for naming purposes. Is this correct?

(edit) If the above is correct, I know some will say that the docs already state something equivalent to this, but the language used perhaps could be revised given this is a tutorial?

One reason I've identified for this error is that if any other accessMode apart from ReadWriteOnce is used (which I know isn't valid but I recently did by mistake), any PVC using this will be stuck in the pending state with this as a somewhat misleading error. Sadly, this also seems to happen at random when tearing down and setting up the PV/PVCs ...

(edit)
To follow up on this further, outside of the tutorial, if the pvc cannot bind to the hostpath PV for any reason you will find that the error is one of storageclass.storage.k8s.io "manual" not found. The error is really misleading since what is actually happening is that the claim cannot be satisfied for some reason. I managed to run into this again when dealing with selectors for a PV, and I'd mispelt the name in the matchLabels.

So if this fails for some reason, it really has nothing to do with storage classes, everything to do with all the conditions of the claim being able to be satisfied. Examples include, the PV not being in the Available state, using any other mode but ReadWriteOnce, having selectors which don't match, having additional specifiers which don't match, so on and so forth.

Given this is a tutorial I suspect the main reason for most users encountering this error will be that they have deleted the PVC but not the PV and so the PV will have been released. Perhaps a note that the PV isn't reusable and will have to be deleted and recreated might help?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 23, 2022
@Kartik494
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 24, 2022
@Eternal21
Copy link

Eternal21 commented Jul 27, 2022

I was also following the linked tutorial, and hit the same error. After reading this thread, I am still not clear on how to proceed.

EDIT: My suggestion would be to add a warning to the top of that tutorial indicating it's out of date.

@allaismail
Copy link

i have the same error
storageclass.storage.k8s.io "manual" not found
what is the solution ?

@sftim
Copy link
Contributor

sftim commented Aug 23, 2022

For this task, I recommend that we cover how to set up any StorageClass that the task requires. The exception would be if we can direct readers to a different task and recommend that they follow the other task page first.

The Kubernetes project can help people here by adding more explanation to the existing web page. This is similar to the point in
#30912 (comment)

@os6sense
Copy link

The problem isn't necessarily one of setting up the StorageClass though, it's that if the PVC cannot bind to the hostpath PV for ANY reason the error is a very generic and misleading one of storageclass.storage.k8s.io "manual" not found.

In the case of @winkee01 if sounds like repetition of the tutorial failed probably because the PV was already bound. Possibly the best solution is to add a warning that before attempting the steps again the Clean up instructions should be followed.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 23, 2022
@Kartik494
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 24, 2022
@matthiasdg
Copy link

matthiasdg commented Dec 16, 2022

I also came here after following the example at kubernetes.io linked above. I did not encounter errors, but was surprised that when I listed my storageclasses using k9s no "manual" was found. It's pretty hilarious that there is still no explanation on this issue.
Based on https://www.kubermatic.com/blog/keeping-the-state-of-apps-4-persistentvolumes-and-persistentvolum/ and https://www.kubermatic.com/blog/keeping-the-state-of-apps-5-introduction-to-storage-classes/, are these only required for dynamic provisioning and can I use whatever I want for manual PVs (such as hostPath) as long as PV and corresponding PVC match?

@m-brando
Copy link

by default, if you don't define StorageClass (SC) in your PersistentVolumeClaims (PVC) the PVC will use the default SC called standard https://kubernetes.io/docs/concepts/storage/storage-classes/#default-storageclass.

This default SC is then used to dynamically provision storage for PVC that does not require any specific storage class https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/#why-change-the-default-storage-class

To my understanding, if you define storageClassName: manual in spec of yaml file for persistent volume, it also needs to be defined for PVC. This SC manual won't get created and is used to bind persistent volume claim requests to this persistent volume.

@mehboobpatel
Copy link

/sig storage /remove-kind support /kind bug /language en

Thanks for reporting this @winkee01

I think that page is out of date and does need fixing.

Hey Tim can we please connect on linkedin or via mail i am facing the same issue in performing task https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/

@dickieku
Copy link

use storageClassName: "" will fix

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. language/en Issues or PRs related to English language sig/storage Categorizes an issue or PR as relevant to SIG Storage. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests