mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-24 23:36:46 +00:00
Merge branch 'master' into 2020-06-enix
This commit is contained in:
@@ -143,6 +143,30 @@ So, what do we get?
|
||||
|
||||
---
|
||||
|
||||
## Other ways to view labels
|
||||
|
||||
- `kubectl get` gives us a couple of useful flags to check labels
|
||||
|
||||
- `kubectl get --show-labels` shows all labels
|
||||
|
||||
- `kubectl get -L xyz` shows the value of label `xyz`
|
||||
|
||||
.exercise[
|
||||
|
||||
- List all the labels that we have on pods:
|
||||
```bash
|
||||
kubectl get pods --show-labels
|
||||
```
|
||||
|
||||
- List the value of label `app` on these pods:
|
||||
```bash
|
||||
kubectl get pods -L app
|
||||
```
|
||||
|
||||
]
|
||||
|
||||
---
|
||||
|
||||
class: extra-details
|
||||
|
||||
## More on selectors
|
||||
|
||||
Reference in New Issue
Block a user