Python微信订餐小程序课程视频
https://blog.csdn.net/m0_56069948/article/details/122285951
Python实战量化交易理财系统
https://blog.csdn.net/m0_56069948/article/details/122285941阅读目录
因为之前写过基于K8S部署jenkins master/slave平台,在这个的基础上构建微服务到K8S集群中
回到顶部## Jenkins-slave构建微服务项目到K8S集群
1、微服务项目上传到git仓库
这个就不多说了
2、更改注册中心eureka的配置文件
进入到项目代码中,更改微服务中eureka-service的配置文件application.yaml(需要和开发对一下,具体还要加哪些参数)
| 123456789101112131415 | server:``port: 8761``spring:
application:
name: eureka-service
eureka:``instance:``prefer-ip-address:
false``client:``region:
default``service-url:``defaultZone: http:``//eureka-0.eureka.default:${server.port}/eureka/,http://eureka-1.eureka.default:${server.port}/eureka/``register-with-eureka:
true``fetch-registry:
true
|
其他应用程序往eureka注册,需要在各自的application.yaml里添加下面的eureka信息
| 123456789 | eureka:``instance:``prefer-ip-address:
false``client:``region:
default``service-url:``defaultZone: http:``//eureka-0.eureka:8761/eureka/,http://eureka-1.eureka:8761/eureka/``register-with-eureka:
true``fetch-registry:
true
|
3、创建statefulset资源文件部署eureka,ingress做负载均衡
(将所以要创建的资源都合并到一个yaml文件,上传到git仓库 项目代码的eureka目录下)
| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263