无法从应用程序访问DB Pod外部IP [英] unable to access DB pod External IP from application

查看:218
本文介绍了无法从应用程序访问DB Pod外部IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Azure Kubernetes群集的顶部创建了两个Pod 1)申请 2)MS SQL服务器

I've created two pods top of Azure Kubernetes cluster 1) Application 2) MS SQL server

两个Pod均通过Azure负载平衡器公开,并且都具有外部IP.我无法在应用程序配置文件中使用外部IP.但是我可以从任何地方连接该SQL Server.由于某种原因,我无法从应用程序容器中远程登录DB IP.

both pods are exposed via Azure Loadbalancer and both having External IPs. I am unable to use the External IP in my application config file. But I can connect that SQL Server from anywhere. For some reason I am unable to telnet DB IP from Application container.

连接越来越超时.但是我可以ping/telnet数据库的群集ip.因此,我尝试在配置文件中使用数据库群集IP来检查连接是否成功但没有运气.

the connection is getting timeout. but I can ping/telnet the DB's cluster ip. So I have tried to use the DB cluster IP in my config file to check if the connection is successful but no luck.

有人可以帮我吗?

推荐答案

此问题已解决.

为应用程序和数据库创建两个Pod,之前在应用程序配置文件中提供数据库集群IP时,它可以工作.但是我能够telnet 1433

Create two pods for Application and DB, Earlier when I provide the DB cluster IP in application config file, it was worked.But I was able to telnet 1433

我在Azure中创建了另一个K8s群集,然后尝试使用相同的设置(提供的群集IP).这次它就像魅力一样.

I have created another K8s cluster in Azure then tried with same setup (provided cluster IP). This time it worked like charm.

感谢@Suresh Vishnoi

Thanks to @Suresh Vishnoi

这篇关于无法从应用程序访问DB Pod外部IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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