Inspect
Node
1 | kubectl describe node [NODE_NAME] |
Proxy
Proxy Service
1 | kubectl port-forward $(kubectl get pod --selector="label=value" --output jsonpath='{.items[0].metadata.name}') local_port:remote_port |
Label
Add label to Node
1 | kubectl label nodes <node-name> <label-key>=<label-value> |
example:
1 | kubectl label nodes gke-xxx-cc361276-cvfg node=elasticsearch |
Remove label on Node
1 | kubectl label node node_name label_name- |
Taint
Add taint to Node
1 | kubectl taint nodes node1 key1=value1:NoSchedule |
Remove taint on Node
1 | kubectl patch node node_name -p '{"spec":{"taints":[]}}' |