Bootstrap FreeKB - OpenShift - Label a Persistent Volume using the oc label command
OpenShift - Label a Persistent Volume using the oc label command

Updated:   |  OpenShift articles

Let's say you have a Persistent Volume named my-persistent-volume. The oc describe persistentvolume command can be used to list the labels currently associated with the Persistent Volume.

~]$ oc describe persistentvolume my-persistent-volume
Name:            my-persistent-volume
Labels:          <none>

 

The oc label persistentvolume command can be used to apply one or more labels to the Persistent Volume.

oc label persistentvolume my-persistent-volume region=east

 

You can then use the oc describe persistentvolume command again to see that the Persistent Volume has the label.

~]$ oc describe persistentvolume my-persistent-volume
Name:            my-persistent-volume
Labels:          region=east

 

And here is how you would remove a label from a Persistent Volume.

oc label persistentvolume my-persistent-volume region-

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 9a6a4c in the box below so that we can be sure you are a human.