Difference between revisions of "Kubernetes selectors"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
 
* https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/
 
* https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/
  
 +
 +
== Examples ==
 
* <code>[[kubectl get pods]] [[--selector]]=app=YOUR_APP</code>
 
* <code>[[kubectl get pods]] [[--selector]]=app=YOUR_APP</code>
  
 
* <code>[[kubectl get pods]] [[--selector]]=app=YOUR_APP -o=[[jsonpath]]='{.items[0].metadata.name}'</code>
 
* <code>[[kubectl get pods]] [[--selector]]=app=YOUR_APP -o=[[jsonpath]]='{.items[0].metadata.name}'</code>
  
[[kubectl get pods]] [[--field-selector]] [[status.]]phase=Running <ref>https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/</ref>
+
* <code>[[kubectl get pods]] [[--field-selector]] [[status.]]phase=Running</code> <ref>https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/</ref>
  
 
  [[selector:]]
 
  [[selector:]]

Revision as of 15:25, 5 January 2023

Advertising: