File tree Expand file tree Collapse file tree 4 files changed +54
-20
lines changed Expand file tree Collapse file tree 4 files changed +54
-20
lines changed Original file line number Diff line number Diff line change @@ -7,16 +7,6 @@ A service is typically exposed by the Kubernetes API server as a collection of e
7
7
access from a Spring Boot application running as a pod. This discovery feature is also used by the Spring Cloud Kubernetes Ribbon project
8
8
to fetch the list of the endpoints defined for an application to be load balanced.
9
9
10
- This is something that you get for free just by adding the following dependency inside your project:
11
-
12
- `` `xml
13
- <dependency >
14
- <groupId >org.springframework.cloud</groupId >
15
- <artifactId >spring-cloud-starter-kubernetes</artifactId >
16
- <version >${latest.version} </version >
17
- </dependency >
18
- ```
19
-
20
10
To enable loading of the `DiscoveryClient` , add `@EnableDiscoveryClient` to the according configuration or application class like this:
21
11
22
12
`` `java
Original file line number Diff line number Diff line change
1
+ == Starters
2
+
3
+ Starters are convenient dependency descriptors you can include in your
4
+ application. Include a starter to get the dependencies and Spring Boot
5
+ auto-configuration for a feature set.
6
+
7
+ [cols="a,d"]
8
+ |===
9
+ | Starter | Features
10
+
11
+ | [source,xml]
12
+ ----
13
+ <dependency >
14
+ <groupId >org.springframework.cloud</groupId >
15
+ <artifactId >spring-cloud-starter-kubernetes</artifactId >
16
+ </dependency >
17
+ ----
18
+ | <<DiscoveryClient for Kubernetes,Discovery Client>> implementation that
19
+ resolves service names to Kubernetes Services.
20
+
21
+ | [source,xml]
22
+ ----
23
+ <dependency >
24
+ <groupId >org.springframework.cloud</groupId >
25
+ <artifactId >spring-cloud-starter-kubernetes-config</artifactId >
26
+ </dependency >
27
+ ----
28
+ | Load application properties from Kubernetes
29
+ <<ConfigMap PropertySource,ConfigMaps>> and <<Secrets PropertySource,Secrets>>.
30
+ <<PropertySource Reload,Reload>> application properties when a ConfigMap or
31
+ Secret changes.
32
+
33
+ | [source,xml]
34
+ ----
35
+ <dependency >
36
+ <groupId >org.springframework.cloud</groupId >
37
+ <artifactId >spring-cloud-starter-kubernetes-ribbon</artifactId >
38
+ </dependency >
39
+ ----
40
+ | <<Ribbon discovery in Kubernetes,Ribbon>> client-side load balancer with
41
+ server list obtained from Kubernetes Endpoints.
42
+
43
+ | [source,xml]
44
+ ----
45
+ <dependency >
46
+ <groupId >org.springframework.cloud</groupId >
47
+ <artifactId >spring-cloud-starter-kubernetes-all</artifactId >
48
+ </dependency >
49
+ ----
50
+ | All Spring Cloud Kubernetes features.
51
+
52
+ |===
Original file line number Diff line number Diff line change @@ -7,16 +7,6 @@ implemented within the [spring-cloud-kubernetes-ribbon](spring-cloud-kubernetes-
7
7
Kubernetes client will populate a https://github.com/Netflix/ribbon[Ribbon] `ServerList` containing information
8
8
about such endpoints.
9
9
10
- The implementation is part of the following starter that you can use by adding its dependency to your pom file:
11
-
12
- `` `xml
13
- <dependency >
14
- <groupId >org.springframework.cloud</groupId >
15
- <artifactId >spring-cloud-starter-kubernetes-ribbon</artifactId >
16
- <version >${latest.version} </version >
17
- </dependency >
18
- ```
19
-
20
10
When the list of the endpoints is populated, the Kubernetes client will search the registered endpoints living in
21
11
the current namespace/project matching the service name defined using the Ribbon Client annotation:
22
12
Original file line number Diff line number Diff line change 5
5
Spring Cloud Kubernetes provide Spring Cloud common interfaces implementations to consume Kubernetes native services.
6
6
The main objective of the projects provided in this repository is to facilitate the integration of Spring Cloud/Spring Boot applications running inside Kubernetes.
7
7
8
+ include::getting-started.adoc[]
9
+
8
10
include::discovery-client.adoc[]
9
11
10
12
include::discovery-kubernetes-native.adoc[]
You can’t perform that action at this time.
0 commit comments