May 2018
Intermediate to advanced
554 pages
13h 51m
English
With the set-based selector, you can use either the in or notin operator, which is similar to the SQL IN clause that can specify multiple keywords, as in the following examples:
$ kubectl get pods -l "project in (pilot)"NAME READY STATUS RESTARTS AGEpilot.dev.memcached 1/1 Running 0 36mpilot.dev.nginx 1/1 Running 0 36mpilot.prod.memcached 1/1 Running 0 36mpilot.prod.nginx 1/1 Running 0 36m
$ kubectl get pods -l "project in (pilot), tier in (frontend)"NAME READY STATUS RESTARTS AGEpilot.dev.nginx 1/1 Running 0 37mpilot.prod.nginx 1/1 Running 0 37m
Read now
Unlock full access