Skip to content

Commit c7961b3

Browse files
authored
kubectl-annotate: add page (#18413)
Signed-off-by: varnika <[email protected]>
1 parent 6b688e0 commit c7961b3

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

pages/common/kubectl-annotate.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# kubectl annotate
2+
3+
> Annotates Kubernetes resources.
4+
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_annotate>.
5+
6+
- Annotate a pod:
7+
8+
`kubectl annotate {{[po|pods]}} {{pod_name}} {{key}}={{value}}`
9+
10+
- Update a pod annotation by overwriting the existing value:
11+
12+
`kubectl annotate {{[po|pods]}} {{pod_name}} {{key}}={{value}} --overwrite`
13+
14+
- Annotate all pods in a namespace with a specific label selector:
15+
16+
`kubectl annotate {{[po|pods]}} {{key}}={{value}} {{[-l|--selector]}} {{label_key}}={{label_value}}`
17+
18+
- List all annotations a pod has:
19+
20+
`kubectl annotate {{[po|pods]}} {{pod_name}} --list`
21+
22+
- Remove the annotation from a pod:
23+
24+
`kubectl annotate {{[po|pods]}} {{pod_name}} {{key}}-`

0 commit comments

Comments
 (0)