Skip to content

Commit

Permalink
Update and rename 19-METRICS.md to 19-POD-LABELS.md
Browse files Browse the repository at this point in the history
  • Loading branch information
OneideLuizSchneider authored Sep 20, 2021
1 parent 13cd5fb commit 0d0cde1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
15 changes: 0 additions & 15 deletions 19-METRICS.md

This file was deleted.

25 changes: 25 additions & 0 deletions 19-POD-LABELS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
How to create kubectl alias (optional):
- `alias k=kubectl`

Doc:
- `https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/`

Add two labels on a POD:
```
apiVersion: v1
kind: Pod
metadata:
name: nginx-labels-pod
labels:
environment: production
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80`
```

Get Pods by labels:
- `k get pods -l environment=production,tier=frontend`

0 comments on commit 0d0cde1

Please sign in to comment.