0
点赞
收藏
分享

微信扫一扫

k8s pod错误的排查步骤和处理方法

以沫的窝 2024-01-19 阅读 11
  1. 查pod
    kubectl get pod -n amadeus -o wide
  2. 查pod日志
    kubectl logs -f --timestamps -n amadeus weyo-server-66ffd9bf5f-nlq4b --tail=200 没权限,给权限
    kubectl create clusterrolebinding system:anonymous --clusterrole=cluster-admin --user=system:anonymous 再查pod日志
    kubectl logs -f --timestamps -n amadeus weyo-server-66ffd9bf5f-nlq4b --tail=200
  3. 根据报错,看是哪个pod问题,重启pod,delete掉pod,会自动生成新的
    kubectl delete pod weyo-web-679774996d-fdplg -n amadeus
  4. 再看下,正常
    kubectl get pod -n amadeus -o wide

举报

相关推荐

0 条评论