502服务器错误Google kubernetes [英] 502 Server Error Google kubernetes

查看:79
本文介绍了502服务器错误Google kubernetes的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天早上,kubernetes集群的入口流量发生了一些变化.所有网站的站点/API:都响应502服务器错误问题.

This morning something has happened with ingress traffic for kubernetes cluster. All websites sites/API:s respond with 502 server error problem.

尚未对群集或Pod进行更新/更改.所有的豆荚都是绿色的,可以正常工作,所有的主人都可以健康.直到今天早上,一切都已经进行了2个多星期.

No updates/changes has been made to cluster or pods. All pods are green and working and all hosts are healty. Everything has been working for more then 2 weeks until this morning.

有人知道这种问题吗?

更新:

在日志中找到"failed_to_pick_backend". 2-3周后可能会发生奇怪的事情.

Found 'failed_to_pick_backend' in logs. Strange that could happen after 2-3 weeks..

推荐答案

吊舱故障可能有千种原因. Kubernetes具有自我修复功能,可以协调直到当前状态不等于所需状态.

There could be a thousand of reasons for the failure of pods. Kubernetes has a functionality of self-healing which reconcile till current state is not equal to the desired state.

Kubernetes 已接受 pods 将会崩溃,甚至 nodes 都将失败的消息.

Kubernetes has accepted it that pods will be crashed, even nodes will be failed.

我认为,就您而言,Ingress控制器无法找到运行状况良好的吊舱来提供流量.因此,最好检查Pod的事件.

I assume, In your case, Ingress controller is not able to find a healthy pod to deliver traffic. Thus, It's better to check the events of the Pods.

kubectl get events

如果要从POD POD_NAME中检出先前终止的容器的日志. 您可以将以下命令与-p标志一起使用

If you want to check out the logs of the previously terminated container from pod POD_NAME. You can use the following command with -p flag

kubectl logs POD_NAME -c CONTAINER_NAME -p

这篇关于502服务器错误Google kubernetes的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆