1

How to list from the commandline, all PVCs of an Openshift cluster ?

From my understanding, the scope of PVCs is the namespace/project, in which it was created. Listing the PVCs implies being connected (using) or at least mentioning the namespace. The best I came up with is :

$ for i in $(oc get project -o name|cut -d"/" -f 2);do echo "Project: $i";oc get pvc -n $i;done

Is there a better/cleaner/quickier way ?

Graham Dumpleton
  • 57,726
  • 6
  • 119
  • 134
projetnumero9
  • 61
  • 2
  • 13

1 Answers1

2

As an admin, try running:

oc get pvc --all-namespaces
Graham Dumpleton
  • 57,726
  • 6
  • 119
  • 134