Examples

Spring Cloud Kubernetes 试图使你的应用程序通过遵循 Spring Cloud 接口来使用 Kubernetes 原生服务变得透明。

在你的应用程序中,你需要将 spring-cloud-kubernetes-discovery 依赖项添加到你的类路径,并移除包含 DiscoveryClient 实现的任何其他依赖项(即 Eureka Discovery 客户端)。PropertySourceLocator 也适用,你需要将 spring-cloud-kubernetes-config 添加到类路径,并移除包含 PropertySourceLocator 实现的任何其他依赖项(即配置服务器客户端)。

以下项目重点介绍了这些依赖项的使用,并演示了如何从任何 Spring Boot 应用程序使用这些库: