允许在 Kubernetes 主节点上调度 Pod? [英] Allow scheduling of pods on Kubernetes master?

查看:30
本文介绍了允许在 Kubernetes 主节点上调度 Pod?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 generic 在裸机上的 CoreOS 上设置了 Kubernetes安装脚本.它运行当前的稳定版本 1298.6.0,Kubernetes 版本为 1.5.4.

I set up Kubernetes on CoreOS on bare metal using the generic install scripts. It's running the current stable release, 1298.6.0, with Kubernetes version 1.5.4.

我们希望有一个高可用的 master 设置,但我们目前没有足够的硬件来专供三台服务器仅用作 Kubernetes master,所以我希望能够允许用户 pod安排在 Kubernetes 主节点上.我在/etc/systemd/system/kubelet.service 中设置了 --register-schedulable=true 但它仍然显示为 SchedulingDisabled.

We'd like to have a highly available master setup, but we don't have enough hardware at this time to dedicate three servers to serving only as Kubernetes masters, so I would like to be able to allow user pods to be scheduled on the Kubernetes master. I set --register-schedulable=true in /etc/systemd/system/kubelet.service but it still showed up as SchedulingDisabled.

我尝试添加将节点包含为工作节点的设置,包括将工作节点 TLS 证书添加到/etc/kubernetes/ssl,将这些设置添加到 kubelet.service,添加一个/etc/kubernetes/worker-kubeconfig.yaml指向这些证书,并将该信息添加到/etc/kubernetes/manifests/kube-proxy.yaml.我使用我现有的节点作为添加内容的模板.这在主节点的主机名下注册了另一个节点,然后它和原始主节点都显示为 NotReady,SchedulingDisabled.

I tried to add settings for including the node as a worker, including adding worker TLS certs to /etc/kubernetes/ssl, adding those settings to kubelet.service, adding an /etc/kubernetes/worker-kubeconfig.yaml that pointed to those certs, and added that information to the /etc/kubernetes/manifests/kube-proxy.yaml. I used my existing nodes as a template for what to add. This registered another node under the master's hostname and then both it and the original master node showed up as NotReady,SchedulingDisabled.

这个问题 表示应该可以在主节点上调度 pod,但我几乎找不到关于该主题的任何其他内容.

This question indicates that scheduling pods on the master node should be possible, but there is barely anything else that I can find on the subject.

推荐答案

如果您使用的是 Kubernetes 1.7 及更高版本:

If you are using Kubernetes 1.7 and above:

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

这篇关于允许在 Kubernetes 主节点上调度 Pod?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆