ZBLOG

查看pod pending状态日志

您可以使用以下命令查看pod的pending状态日志:

  1. 首先,使用kubectl get pods命令获取pod名称。

  2. 然后,使用kubectl describe pod <pod_name>命令获取pod的详细信息。

  3. 最后,查找pod事件中与pending状态相关的日志信息。特别是查看包含错误消息或警告的事件。

例如,在下面的例子中,我们将查看名为my-pod的pod的pending状态日志:

$ kubectl get pods
NAME      READY   STATUS    RESTARTS   AGE
my-pod    0/1     Pending   0          10m

$ kubectl describe pod my-pod
...
Events:
  Type     Reason            Age                  From               Message
  ----     ------            ----                 ----               -------
  Warning  FailedScheduling  5m (x6 over 10m)     default-scheduler  0/2 nodes are available: 2 Insufficient cpu.
  Warning  FailedScheduling  2m (x5 over 9m58s)   default-scheduler  0/2 nodes are available: 2 Insufficient cpu.
  Warning  FailedScheduling  31s (x7 over 9m28s)  default-scheduler  0/2 nodes are available: 2 Insufficient cpu.
  
  ...

在这个例子中,我们可以看到my-pod处于pending状态,因为没有足够的CPU资源可用。根据事件日志,我们可以看到该pod被调度了多次,但都失败了,因为没有可用的节点。

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://golang.0voice.com/?id=2540

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?