nodeSelector不工作1.2.0

时间:2016-10-07 16:39:18

标签: kubernetes

apiVersion: v1
kind: Pod
metadata:
  name: busybox
  namespace: default
spec:
  containers:
  - image: busybox
    command:
      - sleep
      - "3600"
    imagePullPolicy: IfNotPresent
    name: busybox
  restartPolicy: Always
  nodeSelector:
    docker: twelve

在kube主人身上:

kubectl get nodes -l docker=twelve
NAME           LABELS                                              STATUS    AGE
10.10.1.4   docker=twelve,kubernetes.io/hostname=10.10.1.4   Ready     115d
10.10.1.5   docker=twelve,kubernetes.io/hostname=10.10.1.5   Ready     115d

来自事件日志

4m          17s        20        busybox                          Pod                                                         FailedScheduling         {scheduler }                Failed for reason MatchNodeSelector and possibly others

如果我删除了nodeSelector,它会部署w / o问题。 我正在尝试为各种团队处理docker 1.9.1和docker 1.12.1,这是在阻止它。 这是CentOS 7.2.-1511服务器上的kube集群

kubectl version
Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.0", GitCommit:"86327329213fed4af2661c5ae1e92f9956b24f55", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.0", GitCommit:"86327329213fed4af2661c5ae1e92f9956b24f55", GitTreeState:"clean"}

1 个答案:

答案 0 :(得分:0)

重新启动kube-scheduler解决了这个问题。

我想当您向节点添加新标签时,需要重新启动调度程序。