Kubernetes服务无法连接到外部服务或互联网

时间:2020-03-31 09:56:15

标签: kubernetes calico

我的ASP.NET Core Api Web应用程序无法连接到群集之外的任何服务器。甚至无法访问互联网。仅当我的应用程序托管在本地Ubuntu群集中时,才会出现此问题。 在docker桌面集群中运行时,一切正常。

我已经在Windows开发人员机器上作为Hyper-V节点运行的2台Unbuntu 18.04服务器上设置了一个基本的Kubernetes集群。我正在使用印花布作为我的网络覆盖。我已经按照快速入门方法安装了Calico。 我的应用程序已部署为节点端口,并且运行良好。我可以访问所有控制器。 但是,当我尝试连接到例如在群集外部运行的SQL Server时,会收到超时。

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server) Inner exception [A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server

即使使用HttpClient访问google.com的控制器方法超时。

kubectl日志-n kube-system coredns

[ERROR] plugin/errors: 2 google.nl. AAAA: read udp 192.168.237.199:60244->192.168.100.36:53: i/o timeout
[ERROR] plugin/errors: 2 google.nl. A: read udp 192.168.237.199:59045->192.168.100.36:53: i/o timeout
[ERROR] plugin/errors: 2 google.nl. AAAA: read udp 192.168.237.199:58190->192.168.100.36:53: i/o timeout
[ERROR] plugin/errors: 2 google.nl. A: read udp 192.168.237.199:53982->192.168.100.36:53: i/o timeout

因此,似乎有些东西阻止了所有这些请求。我已在我的Ubuntu计算机上禁用了Ubuntu防火墙。因此,其他东西正在阻止。但是我不知道出了什么问题。

任何帮助将不胜感激。

0 个答案:

没有答案