Skip to content
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

关于k8s部署Apollo, 集群外部应用访问ConfigService比较麻烦问题 #4159

Closed
idefav opened this issue Dec 17, 2021 · 1 comment
Closed
Labels
area/configservice apollo-configservice status/fixed issue fixed already

Comments

@idefav
Copy link
Contributor

idefav commented Dec 17, 2021

你的特性请求和某个问题有关吗?请描述

传统vm部署方式, 不存在ip访问不了问题, 但是k8s部署就会存在metaservice返回的时候clusterip, 集群外部无法访问

目前的解决方案有两个

  • 通过apollo-client设置 -Dappllo.configService参数指定configservice slb地址
  • 通过configservice指定默认服务发现的地址为slb的地址

清晰简洁地描述一下你希望的解决方案
有没有可能这样, 搞一个模式叫SLB模式, 这个模式下, metaserver返回的地址是配置好的slb地址, Apollo-client 通过metaserver获取到的地址就是slb地址, 这样的好处就是客户端不用做修改, Metaserver新增个配置, 对于接入应用比较友好

这样就引出另外一个问题, 就是既然都slb做了负载了, 那Apollo-client里面实现的客户端负载逻辑是否可以在slb模式关闭, Apollo-client通过meta-server感知到这个slb模式, app-client 不做负载, 直接使用slb地址来访问, slb担负起均衡器的作用, 客户端不用感知有多少configservice存在

清晰简洁地描述一下这个特性的备选方案

当然, 这种模式下, 集群内部应用可能会存在多次负载问题, pod->ingress->service->pod , 还要个解决方案就是, meta-server感知应用获取configsevice地址请求是否来自集群内部, 如果是内部依然是返回clusterip, 这样会比较好

其它背景

在这里添加和这个特性请求有关的背景说明、截图

如图:
image

@nobodyiam
Copy link
Member

There is a Kubernetes service discovery mode(#3054), which should work for your scenario.

@idefav idefav closed this as completed Dec 20, 2021
@Anilople Anilople added area/configservice apollo-configservice status/fixed issue fixed already labels Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configservice apollo-configservice status/fixed issue fixed already
Projects
None yet
Development

No branches or pull requests

3 participants