kubernetes - Job status is marked as Running when the pod is still pending for being scheduled
问题描述
I noticed my job status is marked as Running when its pod is still pending for being scheduled. Is there a way to get the actual status from the job resource itself without looking at the pod resource?
Job:
$ kubectl describe jobs sample-job
Name: sample-job
...
Start Time: Sat, 28 Sep 2019 13:19:43 -0700
Pods Statuses: 1 Running / 0 Succeeded / 0 Failed
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal SuccessfulCreate 2m16s job-controller Created pod: sample-job-ppcpl
Pod:
$ kubectl describe pods sample-job-ppcpl
Name: sample-job-ppcpl
Status: Pending
Controlled By: Job/sample-job
Conditions:
Type Status
PodScheduled False
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 29s (x7 over 6m25s) default-scheduler 0/1 nodes are available: 1 node(s) didn't match node selector.
解决方案
是的,作业系统将“完成并成功”、“完成并失败”和“仍在进行中”理解为状态。运行意味着它已请求作业运行,而不是它实际上正在执行。
推荐阅读
- javascript - 使用一个数组过滤器而不是多个过滤器
- smali - 如何在 python 中通读 smali 文件?
- javascript - 如何使用 Html 和 Css 创建计划列表?
- c - 未解锁锁定的互斥锁
- rest - 下游提供无效数据时向客户端发送 Http 状态码
- git - 我可以指示 Git 将以相同字符串开头的文件名视为合并冲突吗?
- python - Python 中的 oAuth2 如何从重定向 URI 中获取信息?
- nginx - 推送待处理的服务器请求
- python - 在 Python 中将字典转换为 DataFrame
- github - GitHub - 如何在共享服务器上克隆存储库而不授予我所有存储库的访问权限