-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question]kubernetes/registry.go的discovery问题 #2203
Comments
server跟client一样就好了,感觉最好加上namespace避免client获取到其他其他同名的项目的pod |
我现在遇到一个问题r.GetService能获取到服务节点,但是直接使用discovery:///service-name 拨号的时候就会超时。 |
yaml方便贴一下吗 |
|
pod的yaml,注册信息在pod的注解里 |
你要的看的是Pod的labels对吧?
|
现在的问题是,GetService能获取到endpoints。 很奇怪拿去拨号就不行 |
这个是服务A 请求 服务B的 4021接口,端口没问题的,毕竟直连 podIP:4021 能请求到的 |
不是很理解,client跟server的pod yaml都贴下。 |
member 是server authorizer 是client |
看上去没什么问题,client连接就是超时吗 |
discovery:///appname |
是三个斜杠不是两个 |
好像还是连接超时 |
这要看代码了,curl结果先看下。 |
jeager 上面错误的信息
|
我也遇见过这种情况,不过我是consul做的服务注册,我通过一个麻烦的办法解决了你可以参考一下 `
` |
这样失去了使用服务发现的意义 |
是的,不过当时没有深入去研究。现在看起来没法通过服务名直接请求但是ip可以请求,像是dns的问题? |
嗯,这个方案我也想过,不过如果能加上负载均衡的算法那就更好了 |
请问kubernetes/registry.go (http|grpc).WithEndpoint要怎么写? discovery://namespace/appname 这样子?还是 discovery:///appname 或者 直接是appname? 有什么快速的办法验证吗
The text was updated successfully, but these errors were encountered: