cancel
Showing results for 
Search instead for 
Did you mean: 
sakshi-80
Mission Specialist
Mission Specialist
  • 756 Views

Openshift command to find label keys

Hi Team,

 

Is there an Openshift command that lists all the label keys like  `node-role.kubernetes.io` , `machineconfiguration.openshift.io/role' ?

 

 

Thanks

Sakshi

3 Replies
Wasim_Raja
Moderator
Moderator
  • 704 Views

@sakshi-80 Thank you for reaching out.

Can you give it a try for "$ oc api-resources --verbs=list --selector=node-role.kubernetes.io"

0 Kudos
sakshi-80
Mission Specialist
Mission Specialist
  • 672 Views

Thanks @Wasim ffor the reply. I need to rephrase my question correctly.

Is there any oc command or documentation that lists all the supported open shift label key?

 

 

0 Kudos
IvanLabrovic
Flight Engineer
Flight Engineer
  • 505 Views

I don't know if such thing exists because you can basically use any label you want.
Example: oc label cm cm1 'anything.io/You.want'=possible
configmap/cm1 labeled

If it helps more, you can have the oc command show all labels for about any resource.
e.g.: oc get cm --show-labels
NAME DATA AGE LABELS
cm1 1 4m49s anything.io/You.want=possible

0 Kudos
Join the discussion
You must log in to join this conversation.