首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >抢占: 0/1节点可用:1抢占对调度没有帮助

抢占: 0/1节点可用:1抢占对调度没有帮助
EN

Stack Overflow用户
提问于 2022-10-18 18:19:41
回答 1查看 210关注 0票数 -2

在Mac上,我创建了一个单一节点集群,然后按照https://kind.sigs.k8s.io/docs/user/ingress/中的指示,尝试安装nginx入口。

代码语言:javascript
复制
kind create cluster --name devops

kubectl apply --filename https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml

kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=180s

它超时了;对于节点来说,没有污染。

代码语言:javascript
复制
kubectl get node
NAME                   STATUS   ROLES           AGE   VERSION
devops-control-plane   Ready    control-plane   16m   v1.25.2

kubectl describe node devops-control-plane | grep Taint
Taints:             <none>

超时是由于未能在主节点上放置吊舱。

代码语言:javascript
复制
kubectl -n ingress-nginx describe pod ingress-nginx-controller-7d68cdddd8-tkzzz
...
Node-Selectors:              ingress-ready=true
                             kubernetes.io/os=linux
Tolerations:                 node-role.kubernetes.io/control-plane:NoSchedule
                             node-role.kubernetes.io/master:NoSchedule
                             node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason            Age   From               Message
  ----     ------            ----  ----               -------
  Warning  FailedScheduling  104s  default-scheduler  0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.

我在这里做错了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-10-19 09:55:31

请阅读有关将Pods分配给节点的文档!我看到你的吊舱上有一些节点选择器。这可能是调度失败的原因。您可以移除节点选择器,也可以将所需的标签添加到节点(我猜入口就绪标签丢失了):

代码语言:javascript
复制
kubectl label nodes devops-control-plane ingress-ready=true
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74115721

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档