如何解决VKE容器服务访问不通问题

容器
问题描述

客户反馈无法访问通过 CLB 代理的 VKE 暴露的服务,该如何排查?

问题分析

出现服务无法访问的问题可能出现在 CLB 和 VKE 侧,可能由于 CLB 的性能问题或者 VKE 的服务异常导致访问不通。

解决方案

1.在K8S集群内的node节点执行curl请求命令访问服务暴露的端口,确认VKE服务正常

root@nc7l3ipersfeprqmefua0:~# curl 192.168.*.*:30761
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

2.排查CLB的问题

通过云监控查看CLB的的后端服务端口健康状态监控,发现后端服务全部异常。 alt

3.查看CLB的具体配置

在本例中,发现健康检查路径配置错误,配置为/ping, 导致健康检查通不过,丢弃了向后端转发的流量,正确的配置如下图,路径应该为/, 才能返回正确的状态码 http_2xx,http_3xx alt

如果您有其他问题,欢迎您联系火山引擎技术支持服务

73
0
0
0
相关产品
评论
未登录
看完啦,登录分享一下感受吧~
暂无评论