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集群内搭建了nacos,有几个微服务是独立部署的,有几个服务是K8s的Pod部署的,独立服务怎么与Pod内的服务通过Feign进行访问? #316

Open
fujc-dev opened this issue May 13, 2022 · 8 comments

Comments

@fujc-dev
Copy link

No description provided.

@fujc-dev fujc-dev changed the title k8s集群内搭建nacos,有几个微服务是独立部署的,无法通过Feign进行访问 k8s集群内搭建了nacos,有几个微服务是独立部署的,有几个服务是K8s的Pod部署的,独立服务怎么与Pod内的服务通过Feign进行访问? May 13, 2022
@opcache
Copy link

opcache commented Aug 24, 2022

可以用nginx ingress 代理出来,可以再创建一个NodePort svc暴露出来,哈哈哈
参考这个

@fujc-dev
Copy link
Author

fujc-dev commented Aug 25, 2022 via email

@cobb-tx
Copy link

cobb-tx commented Nov 5, 2022

@fujc-dev 我也有相同的问题 求教一下你解决了没

@opcache
Copy link

opcache commented Nov 7, 2022

@fujc-dev 我也有相同的问题 求教一下你解决了没

建两个service 就可以啊,一个对k8s内网,一个用nodeport外部

@cobb-tx
Copy link

cobb-tx commented Nov 7, 2022

@fujc-dev 我也有相同的问题 求教一下你解决了没

建两个service 就可以啊,一个对k8s内网,一个用nodeport外部

那其实就是把所有的 clusterIP换成了nodeport对嘛 ,那你注册的时候也是pod ip呀 外部没法访问的 除非你注册的是节点加ip的形式

@fujc-dev
Copy link
Author

fujc-dev commented Nov 7, 2022

@cobb-tx 我也没有解决,因为无法通过nacos进行访问,我只能退而求其次直接Feign包一个具体的网关地址,因为我的网关是部署在k8s上的。

@cobb-tx
Copy link

cobb-tx commented Nov 8, 2022

@cobb-tx 我也没有解决,因为无法通过nacos进行访问,我只能退而求其次直接Feign包一个具体的网关地址,因为我的网关是部署在k8s上的。

我们之前用的就是网关,因为就没有注册中心。 现在要接入到注册中心,反而不好弄了

@jianali
Copy link

jianali commented Aug 1, 2023

我也遇到类似的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants