register node with taints
有时我们需要在创建node时候就已经带上labels/taints,而不是等node加入集群后再加labels/taints(也就是)
taints
在/var/lib/kubelet/config.yaml中添加registerWithTaints,如
kubelet 添加命令行参数register-with-taints,如
--register-with-taints=demokey=demovalue:PreferNoSchedule
registerWithTaints:
- key: demokey
value: demovalue
effect: PreferNoSchedule
如果是kubeadm部署,可以使用JoinConfiguration,添加内容如下
nodeRegistration:
taintstaints:
- key: demokey
value: demovalue
effect: PreferNoSchedule
register node with labels
kubelet 添加命令行参数,如
--node-labels=demokey=demovalue
如果是kubeadm部署,可以使用JoinConfiguration,添加内容如下
nodeRegistration:
kubeletExtraArgs:
- node-labels: demokey=demovalue
网友评论