Kubernetes 将Pod调度到Master节点

755 阅读1分钟

出于安全考虑,默认配置下Kubernetes不会将Pod调度到Master节点。如果希望将k8s-master也当作Node使用,可以执行如下命令:

    $ kubectl taint node master node-role.kubernetes.io/master-

上述master为主节点的hostname,如果要恢复Master Only状态,执行如下命令:

    $ kubectl taint node master node-role.kubernetes.io/master=:NoSchedule

到此 Kubernetes 将Pod调度到Master节点介绍完成。