dongqingchan2385 2018-01-22 01:37
浏览 61

我有一个在Kubernetes上运行的Golang应用程序,但是当pod死掉时,根本没有错误消息。 我该怎么办?

As titled.

When I run kubectl logs my-go-app-deployment-1967699436-yxxn7 or kubectl logs my-go-app-deployment-1967699436-yxxn7 -p, there are no error log print out at all.

What should I do? What makes a Golang pods crashes?

  • 写回答

1条回答 默认 最新

  • doudou2121 2018-01-22 08:48
    关注

    First you should inspect the pod to see the reason why it died and if it was restarted.

    kubectl describe pod my-go-app-deployment-1967699436-yxxn7
    

    Look for entries in Containers -> your container -> Last State.

    If it was restarted you might want to check the previous logs as well:

    kubectl logs --previous pod my-go-app-deployment-1967699436-yxxn7
    
    评论

报告相同问题?

悬赏问题

  • ¥15 vscode问题请教
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM