File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
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}}- `
You can’t perform that action at this time.
0 commit comments