- 将KubernetesClient注入到Spring Cloud应用中,用于服务发现,将一个Spring Cloud 应用,作为Kubernetes Service部署时,就是服务注册;使用K8s的服务注册发现能力代替了Spring Cloud Netflix的服务注册发现组件Eureka;
- 让Spring Cloud应用可以使用K8s集群中的对象,如ConfigMap,Secrets等
-
Spring Cloud中其他组件的适配
具体如下:
spring-cloud-kubernetes项目提供了如下的能力
- DiscoveryClient for Kubernetes
- KubernetesClient autoconfiguration
- PropertySource
- ConfigMap PropertySource
- Secrets PropertySource
- PropertySource Reload
- Pod Health Indicator
- Transparency (its transparent whether the code runs in or outside of Kubernetes)
- Kubernetes Profile Autoconfiguration
- Ribbon discovery in Kubernetes
- Zipkin discovery in Kubernetes
- ConfigMap Archaius Bridge