mirror of
https://github.com/bregman-arie/devops-exercises.git
synced 2026-02-04 23:59:11 +00:00
13 lines
311 B
Markdown
13 lines
311 B
Markdown
|
|
# Labels and Selectors 101
|
||
|
|
|
||
|
|
## Objectives
|
||
|
|
|
||
|
|
1. How to list all the Pods with the label "app=web"?
|
||
|
|
2. How to list all objects labeled as "env=staging"?
|
||
|
|
3. How to list all deployments from "env=prod" and "type=web"?
|
||
|
|
|
||
|
|
## Solution
|
||
|
|
|
||
|
|
`k get po -l app=web`
|
||
|
|
`k get all -l env=staging`
|
||
|
|
`k get deploy -l env=prod,type=web`
|