kais 修订了这个 Gist 1 month ago. 转到此修订
1 file changed, 9 insertions
scale_ds_k8s(文件已创建)
| @@ -0,0 +1,9 @@ | |||
| 1 | + | * Scaling k8s daemonset down to zero | |
| 2 | + | ``` | |
| 3 | + | kubectl -n kube-system patch daemonset myDaemonset -p '{"spec": {"template": {"spec": {"nodeSelector": {"non-existing": "true"}}}}}' | |
| 4 | + | ``` | |
| 5 | + | ||
| 6 | + | * Scaling up k8s daemonset | |
| 7 | + | ``` | |
| 8 | + | kubectl -n kube-system patch daemonset myDaemonset --type json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/non-existing"}]' | |
| 9 | + | ``` | |
上一页
下一页