Selectors
Selectors help to choose and find the resources that you are particularly looking for using labels.
For working with selectors, here is an example find you can proceed with. The same can be extended to deployments and services.
List only the pods with environment 'production'
List only the pods with development lead 'Carisa'
Working with Multiple Selectors
Search for multiple labels with negation. This command returns the list of pods with environment as 'production' and dev-lead not equal to 'Carisa'.
In and Not In Operator
in operator to get pods with specific release version range
Example of notin operator
Deleting pods with labels
Deletes all pods with a particular dev-lead 'Carisa'.
Last updated