skip to content
Alvin Lucillo

Selecting with mult labels

/ 1 min read

💻 Tech

Selecting k8s resources by labels is a great way to select specific resources. For example, the two commands below queries pods with compound selectors. The last one just counts the number of rows without headers.

k get po --selector env=test,app=frontend,version=v1
k get po --no-headers --selector env=test,app=frontend,version=v1 | wc -l