Kubernetes 由于调度失败,Pod保持挂起状态
我是Kubernetes的新手,我正在尝试运行部署 在我按下deploy config之后,复制集被创建,并且该复制集将创建pod。但pod仍处于待定状态 pod列出了一个无法计划的事件,因为没有可用的节点。输出kubectl描述pod foo-qa-1616599440: 但也有可用的节点。kubectl get节点的输出: 当我检查事件列表时,如果我是正确的,我会看到一些计划发生。kubectl get事件的输出-排序依据='.metadata.creationTimestamp': 有人能帮我找到正确的方向吗 但pod仍处于待定状态 pod列出了一个无法计划的事件,因为没有可用的节点 如果你已经达到你的能力,这是意料之中的。您可以通过以下方式检查任何节点的容量:Kubernetes 由于调度失败,Pod保持挂起状态,kubernetes,scheduler,kubernetes-pod,Kubernetes,Scheduler,Kubernetes Pod,我是Kubernetes的新手,我正在尝试运行部署 在我按下deploy config之后,复制集被创建,并且该复制集将创建pod。但pod仍处于待定状态 pod列出了一个无法计划的事件,因为没有可用的节点。输出kubectl描述pod foo-qa-1616599440: 但也有可用的节点。kubectl get节点的输出: 当我检查事件列表时,如果我是正确的,我会看到一些计划发生。kubectl get事件的输出-排序依据='.metadata.creationTimestamp': 有人能
kubectl describe node <node_name>
要缓解这种情况,请使用更多节点或更少的POD,或进行配置,以便在发生这种情况时群集可以自动缩放。尝试的事项:
删除作业创建的所有吊舱。使用kubectl delete-all pods-namespace=foo可以删除指定命名空间中的所有pod。此外,可能会删除明显缺少配置的作业。作业可以配置为在定义的失败或成功次数后停止生成吊舱。在中检查backOffLimit和restartPolicy
检查污染和耐受性。使用kubectl描述节点和内部的污染:部分描述节点。如果有一些污点,你将不得不在你的工作中反映出来。还要检查内存压力或类似的东西。它也将列在节点描述中
使用kubectl顶部节点检查可用资源。检查可用的RAM和CPU
检查是否可以提取容器图像。也许把它拉到Docker上,确保它能工作,并且不会给你一个超时时间
与kubectl get netpol-A一起检查所有网络策略,以确保任何策略都会阻止与kube系统中POD的通信
您也可以检查RBAC配置,但这将是牵强的
您首先可以做的是检查您的群集autoscaler、RBAC以及附加到节点的角色。您可能会发现您缺少一些权限。
对于cron,请检查restartPolicy。我认为您已达到每个节点上的最大pod集,您可以在kubectl get nodes-o yaml | grep podsThanks检查可能的数量,以获得答案。节点确实已达到其容量。我现在通过更新CronJob配置并让节点在队列中工作,解决了这个问题。谢谢您的回答。从您建议的命令中获得了容量的良好指示。建议的配置选项已经就位,但我添加了concurrencyPolicy:bank选项,该选项在减少pod创建方面做了很多工作。
NAME STATUS ROLES AGE VERSION
ip-xxx-xx-xx-xx.eu-central-1.compute.internal Ready <none> 64d v1.17.12-eks-7684af
ip-xxx-xx-xx-xx.eu-central-1.compute.internal Ready <none> 64d v1.17.12-eks-7684af
ip-xxx-xx-xx-xx.eu-central-1.compute.internal Ready <none> 54d v1.17.12-eks-7684af
ip-xxx-xx-xx-xx.eu-central-1.compute.internal Ready <none> 64d v1.17.12-eks-7684af
ip-xxx-xx-xx-xx.eu-central-1.compute.internal Ready <none> 54d v1.17.12-eks-7684af
ip-xxx-xx-xx-xx.eu-central-1.compute.internal Ready <none> 64d v1.17.12-eks-7684af
...
cron-foo-qa-1616598720 0/1 17m 17m
cron-foo-qa-1616598780 0/1 16m 16m
cron-foo-qa-1616598840 0/1 15m 15m
cron-foo-qa-1616598900 0/1 14m 14m
cron-foo-qa-1616598960 0/1 13m 13m
cron-foo-qa-1616599020 0/1 12m 12m
cron-foo-qa-1616599080 0/1 11m 11m
cron-foo-qa-1616599200 0/1 9m2s 9m2s
cron-foo-qa-1616599260 0/1 8m4s 8m4s
cron-foo-qa-1616599320 0/1 7m7s 7m7s
cron-foo-qa-1616599380 0/1 6m11s 6m12s
cron-foo-qa-1616599440 0/1 5m1s 5m1s
cron-foo-qa-1616599500 0/1 4m4s 4m4s
cron-foo-qa-1616599560 0/1 3m6s 3m6s
cron-foo-qa-1616599620 0/1 2m10s 2m10s
cron-foo-qa-1616599680 0/1 74s 74s
cron-foo-qa-1616599740 0/1 2s
...
3s Warning FailedScheduling pod/cron-foobar-prod-1616590260-vwqsk 0/6 nodes are available: 6 Insufficient pods.
3s Warning FailedScheduling pod/cron-foobar-acc-1616590260-j29vx 0/6 nodes are available: 6 Insufficient pods.
3s Warning FailedScheduling pod/cron-foobar-prod-1616569560-g8mn2 0/6 nodes are available: 6 Insufficient pods.
3s Normal Scheduled pod/cron-foobar-acc-1616560380-6x88z Successfully assigned middleware/cron-foobar-acc-1616560380-6x88z to ip-xxx-xxx-xxx-xxx.eu-central-1.compute.internal
3s Warning FailedScheduling pod/cron-foobar-prod-1616596560-hx895 0/6 nodes are available: 6 Insufficient pods.
3s Warning FailedScheduling pod/cron-foobar-prod-1616598180-vwls2 0/6 nodes are available: 6 Insufficient pods.
3s Warning FailedScheduling pod/cron-foobar-qa-1616536260-vh7bl 0/6 nodes are available: 6 Insufficient pods.
3s Warning FailedScheduling pod/cron-foobar-acc-1616571840-68l54 0/6 nodes are available: 6 Insufficient pods.
3s Warning FailedScheduling pod/cron-foobar-qa-1616564760-4wg7l 0/6 nodes are available: 6 Insufficient pods.
3s Warning FailedScheduling pod/cron-foobar-prod-1616571840-7wmlc 0/6 nodes are available: 6 Insufficient pods.
3s Normal Started pod/cron-foobar-prod-1616564700-6gk58 Started container cron
3s Warning FailedScheduling pod/cron-foobar-acc-1616587260-hrcmq 0/6 nodes are available: 6 Insufficient pods.
3s Warning FailedScheduling pod/cron-foobar-qa-1616595720-x5njq 0/6 nodes are available: 6 Insufficient pods.
3s Warning FailedScheduling pod/cron-foobar-acc-1616525820-x5vhr 0/6 nodes are available: 6 Insufficient pods.
3s Warning FailedScheduling pod/cron-foobar-qa-1616558100-x4p96 0/6 nodes are available: 6 Insufficient pods.
kubectl describe node <node_name>
kubectl get nodes