Closed Jich1123 closed 4 months ago
🤖
你好,@Jich1123!我是Dosu,一个可以帮助你解决问题、回答问题并成为贡献者的机器人。在等待人类维护者的同时,我在这里为你提供帮助。让我们一起解决这个问题吧!
根据我在Apollo存储库中找到的信息,有两个类似的已解决问题可能对您有所帮助。
关于k8s部署Apollo, 集群外部应用访问ConfigService比较麻烦问题。这个问题的建议解决方案是使用Kubernetes服务发现模式,这应该适用于您的场景。
apollo部署到k8s后,客户端获取不到配置。这个问题的解决方案是查看源码并重启configService。
对于您的问题,您可以尝试使用Apollo客户端的一个特性,该特性允许您跳过Meta Server服务发现并直接指定apollo-configservice
地址。这个特性在Apollo客户端版本0.11.0及以上版本中可用。
您可以通过在Apollo客户端的app.properties
文件中设置apollo.configService
属性来实现这一点。例如:
app.id=SampleApp
apollo.configService=http://your-externally-exposed-meta-server-address
在这个例子中,将http://your-externally-exposed-meta-server-address
替换为您的外部暴露的Meta Server的实际地址。
关于Apollo 2.2.0版本中可能影响到在Kubernetes环境中连接到配置服务的更改,我在存储库中没有找到相关信息,但答案可能在其他地方,或者我可能遗漏了。
希望这些信息对您有所帮助。如果您有任何其他问题或需要进一步的帮助,请随时告诉我。
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.
描述bug
HELM 部署完2.2.0版本。config的Home Page Url是k8s中的SVC地址http://apollo-service-dev-apollo-configservice.sh-toolchain:8080,本地调试的时候java去通过暴露在外部的Meta Server去连接apollo-config,由于是内部的SVC地址,无法在本地连上。
期望
可以在本地获取到config的配置
截图