diff --git a/multi/multi__kubernetes_ecosystem_awareness.html b/multi/multi__kubernetes_ecosystem_awareness.html new file mode 100644 index 00000000..c8c14f70 --- /dev/null +++ b/multi/multi__kubernetes_ecosystem_awareness.html @@ -0,0 +1,14 @@ + + + 6. Kubernetes Ecosystem Awareness

6. Kubernetes Ecosystem Awareness

All of the features described above will work equally well regardless of whether your application is running inside +Kubernetes or not. This is really helpful for development and troubleshooting. +From a development point of view, this is really helpful as you can start your Spring Boot application and debug one +of the modules part of this project. It is not required to deploy it in Kubernetes +as the code of the project relies on the +Fabric8 Kubernetes Java client which is a fluent DSL able to +communicate using http protocol to the REST API of Kubernetes Server.

6.1 Kubernetes Profile Autoconfiguration

When the application runs as a pod inside Kubernetes a Spring profile named kubernetes will automatically get activated. +This allows the developer to customize the configuration, to define beans that will be applied when the Spring Boot application is deployed +within the Kubernetes platform (e.g. different dev and prod configuration).

6.2 Istio Awareness

When including the spring-cloud-kubernetes-istio module into the application classpath a new profile will be added to the application, +if the application is running inside a Kubernetes Cluster with Istio installed. Then you can use +spring @Profile("istio") annotations into your Beans and @Configuration's.

The Istio awareness module uses the me.snowdrop:istio-client to interact with Istio APIs enabling us to discover traffic rules, circuit breakers, etc. +Making it easy for our Spring Boot applications to consume this data to dynamically configure themselves according the environment.

\ No newline at end of file diff --git a/multi/multi__pod_health_indicator.html b/multi/multi__pod_health_indicator.html index 2d7dbd5a..a3a947fc 100644 --- a/multi/multi__pod_health_indicator.html +++ b/multi/multi__pod_health_indicator.html @@ -1,4 +1,4 @@ - 7. Pod Health Indicator

7. Pod Health Indicator

Spring Boot uses HealthIndicator to expose info about the health of an application. -That makes it really useful for exposing health related information to the user and are also a good fit for use as readiness probes.

The Kubernetes health indicator which is part of the core module exposes the following info:

\ No newline at end of file + 7. Pod Health Indicator

7. Pod Health Indicator

Spring Boot uses HealthIndicator to expose info about the health of an application. +That makes it really useful for exposing health related information to the user and are also a good fit for use as readiness probes.

The Kubernetes health indicator which is part of the core module exposes the following info:

\ No newline at end of file diff --git a/multi/multi__ribbon_discovery_in_kubernetes.html b/multi/multi__ribbon_discovery_in_kubernetes.html index 2ff0af20..f15e78a4 100644 --- a/multi/multi__ribbon_discovery_in_kubernetes.html +++ b/multi/multi__ribbon_discovery_in_kubernetes.html @@ -1,6 +1,6 @@ - 5. Ribbon discovery in Kubernetes

5. Ribbon discovery in Kubernetes

Spring Cloud client applications calling a microservice should be interested on relying on a client load-balancing + 5. Ribbon discovery in Kubernetes

5. Ribbon discovery in Kubernetes

Spring Cloud client applications calling a microservice should be interested on relying on a client load-balancing feature in order to automatically discover at which endpoint(s) it can reach a given service. This mechanism has been implemented within the [spring-cloud-kubernetes-ribbon](spring-cloud-kubernetes-ribbon/pom.xml) project where a Kubernetes client will populate a Ribbon ServerList containing information @@ -18,4 +18,4 @@ behavior is to use the first one found. To select more specifically which port t the PortName key. If you want to specify in which Kubernetes' namespace the target service should be looked up, use the KubernetesNamespace key, remembering in both instances to prefix these keys with your service name and ribbon prefix as specified above.

Examples that are using this module for ribbon discovery are:

Note: The Ribbon discovery client can be disabled by setting this key within the application properties file -spring.cloud.kubernetes.ribbon.enabled=false.

\ No newline at end of file +spring.cloud.kubernetes.ribbon.enabled=false.

\ No newline at end of file diff --git a/multi/multi_spring-cloud-kubernetes.html b/multi/multi_spring-cloud-kubernetes.html index 2925c8c9..0c8284d1 100644 --- a/multi/multi_spring-cloud-kubernetes.html +++ b/multi/multi_spring-cloud-kubernetes.html @@ -1,3 +1,3 @@ - Spring Cloud Kubernetes

Spring Cloud Kubernetes


Table of Contents

1. Why do you need Spring Cloud Kubernetes?
2. DiscoveryClient for Kubernetes
3. Kubernetes native service discovery
4. Kubernetes PropertySource implementations
4.1. ConfigMap PropertySource
4.2. Secrets PropertySource
4.3. PropertySource Reload
5. Ribbon discovery in Kubernetes
6. Kubernetes Awareness
6.1. Kubernetes Profile Autoconfiguration
7. Pod Health Indicator
8. Leader Election
9. Security Configurations inside Kubernetes
9.1. Namespace
9.2. Service Account
10. Examples
11. Other Resources
12. Building
12.1. Basic Compile and Test
12.2. Documentation
12.3. Working with the code
12.3.1. Importing into eclipse with m2eclipse
12.3.2. Importing into eclipse without m2eclipse
13. Contributing
13.1. Sign the Contributor License Agreement
13.2. Code of Conduct
13.3. Code Conventions and Housekeeping
\ No newline at end of file + Spring Cloud Kubernetes

Spring Cloud Kubernetes


Table of Contents

1. Why do you need Spring Cloud Kubernetes?
2. DiscoveryClient for Kubernetes
3. Kubernetes native service discovery
4. Kubernetes PropertySource implementations
4.1. ConfigMap PropertySource
4.2. Secrets PropertySource
4.3. PropertySource Reload
5. Ribbon discovery in Kubernetes
6. Kubernetes Ecosystem Awareness
6.1. Kubernetes Profile Autoconfiguration
6.2. Istio Awareness
7. Pod Health Indicator
8. Leader Election
9. Security Configurations inside Kubernetes
9.1. Namespace
9.2. Service Account
10. Examples
11. Other Resources
12. Building
12.1. Basic Compile and Test
12.2. Documentation
12.3. Working with the code
12.3.1. Importing into eclipse with m2eclipse
12.3.2. Importing into eclipse without m2eclipse
13. Contributing
13.1. Sign the Contributor License Agreement
13.2. Code of Conduct
13.3. Code Conventions and Housekeeping
\ No newline at end of file diff --git a/single/spring-cloud-kubernetes.html b/single/spring-cloud-kubernetes.html index 7197aead..32946bd8 100644 --- a/single/spring-cloud-kubernetes.html +++ b/single/spring-cloud-kubernetes.html @@ -1,6 +1,6 @@ - Spring Cloud Kubernetes

Spring Cloud Kubernetes


Table of Contents

1. Why do you need Spring Cloud Kubernetes?
2. DiscoveryClient for Kubernetes
3. Kubernetes native service discovery
4. Kubernetes PropertySource implementations
4.1. ConfigMap PropertySource
4.2. Secrets PropertySource
4.3. PropertySource Reload
5. Ribbon discovery in Kubernetes
6. Kubernetes Awareness
6.1. Kubernetes Profile Autoconfiguration
7. Pod Health Indicator
8. Leader Election
9. Security Configurations inside Kubernetes
9.1. Namespace
9.2. Service Account
10. Examples
11. Other Resources
12. Building
12.1. Basic Compile and Test
12.2. Documentation
12.3. Working with the code
12.3.1. Importing into eclipse with m2eclipse
12.3.2. Importing into eclipse without m2eclipse
13. Contributing
13.1. Sign the Contributor License Agreement
13.2. Code of Conduct
13.3. Code Conventions and Housekeeping

1. Why do you need Spring Cloud Kubernetes?

Spring Cloud Kubernetes provide Spring Cloud common interfaces implementations to consume Kubernetes native services. + Spring Cloud Kubernetes

Spring Cloud Kubernetes


1. Why do you need Spring Cloud Kubernetes?

Spring Cloud Kubernetes provide Spring Cloud common interfaces implementations to consume Kubernetes native services. The main objective of the projects provided in this repository is to facilitate the integration of Spring Cloud/Spring Boot applications running inside Kubernetes.

2. DiscoveryClient for Kubernetes

This project provides an implementation of Discovery Client for Kubernetes. This allows you to query Kubernetes endpoints (see services) by name. @@ -248,15 +248,18 @@ behavior is to use the first one found. To select more specifically which port t the PortName key. If you want to specify in which Kubernetes' namespace the target service should be looked up, use the KubernetesNamespace key, remembering in both instances to prefix these keys with your service name and ribbon prefix as specified above.

Examples that are using this module for ribbon discovery are:

Note: The Ribbon discovery client can be disabled by setting this key within the application properties file -spring.cloud.kubernetes.ribbon.enabled=false.

6. Kubernetes Awareness

All of the features described above will work equally well regardless of whether your application is running inside +spring.cloud.kubernetes.ribbon.enabled=false.

6. Kubernetes Ecosystem Awareness

All of the features described above will work equally well regardless of whether your application is running inside Kubernetes or not. This is really helpful for development and troubleshooting. From a development point of view, this is really helpful as you can start your Spring Boot application and debug one of the modules part of this project. It is not required to deploy it in Kubernetes as the code of the project relies on the -[Fabric8 Kubernetes Java client](https://github.com/fabric8io/kubernetes-client) which is a fluent DSL able to +Fabric8 Kubernetes Java client which is a fluent DSL able to communicate using http protocol to the REST API of Kubernetes Server.

6.1 Kubernetes Profile Autoconfiguration

When the application runs as a pod inside Kubernetes a Spring profile named kubernetes will automatically get activated. This allows the developer to customize the configuration, to define beans that will be applied when the Spring Boot application is deployed -within the Kubernetes platform (e.g. different dev and prod configuration).

7. Pod Health Indicator

Spring Boot uses HealthIndicator to expose info about the health of an application. +within the Kubernetes platform (e.g. different dev and prod configuration).

6.2 Istio Awareness

When including the spring-cloud-kubernetes-istio module into the application classpath a new profile will be added to the application, +if the application is running inside a Kubernetes Cluster with Istio installed. Then you can use +spring @Profile("istio") annotations into your Beans and @Configuration's.

The Istio awareness module uses the me.snowdrop:istio-client to interact with Istio APIs enabling us to discover traffic rules, circuit breakers, etc. +Making it easy for our Spring Boot applications to consume this data to dynamically configure themselves according the environment.

7. Pod Health Indicator

Spring Boot uses HealthIndicator to expose info about the health of an application. That makes it really useful for exposing health related information to the user and are also a good fit for use as readiness probes.

The Kubernetes health indicator which is part of the core module exposes the following info:

  • pod name, ip address, namespace, service account, node name and its ip address
  • flag that indicates if the Spring Boot application is internal or external to Kubernetes

8. Leader Election

<TBD>

9. Security Configurations inside Kubernetes

9.1 Namespace

Most of the components provided in this project need to know the namespace. For Kubernetes (1.3+) the namespace is made available to pod as part of the service account secret and automatically detected by the client. For earlier version it needs to be specified as an env var to the pod. A quick way to do this is:

env:
 - name: "KUBERNETES_NAMESPACE"
diff --git a/spring-cloud-kubernetes.xml b/spring-cloud-kubernetes.xml
index 68d4516d..d1f12cc5 100644
--- a/spring-cloud-kubernetes.xml
+++ b/spring-cloud-kubernetes.xml
@@ -581,14 +581,14 @@ the KubernetesNamespace key, remembering in both instances to
 Note: The Ribbon discovery client can be disabled by setting this key within the application properties file
 spring.cloud.kubernetes.ribbon.enabled=false.
 
-
-Kubernetes Awareness
+
+Kubernetes Ecosystem Awareness
 All of the features described above will work equally well regardless of whether your application is running inside
 Kubernetes or not. This is really helpful for development and troubleshooting.
 From a development point of view, this is really helpful as you can start your Spring Boot application and debug one
 of the modules part of this project. It is not required to deploy it in Kubernetes
 as the code of the project relies on the
-[Fabric8 Kubernetes Java client](https://github.com/fabric8io/kubernetes-client) which is a fluent DSL able to
+Fabric8 Kubernetes Java client which is a fluent DSL able to
 communicate using http protocol to the REST API of Kubernetes Server.
 
Kubernetes Profile Autoconfiguration @@ -596,6 +596,14 @@ communicate using http protocol to the REST API of Kubernetes This allows the developer to customize the configuration, to define beans that will be applied when the Spring Boot application is deployed within the Kubernetes platform (e.g. different dev and prod configuration).
+
+Istio Awareness +When including the spring-cloud-kubernetes-istio module into the application classpath a new profile will be added to the application, +if the application is running inside a Kubernetes Cluster with Istio installed. Then you can use +spring @Profile("istio") annotations into your Beans and @Configuration's. +The Istio awareness module uses the me.snowdrop:istio-client to interact with Istio APIs enabling us to discover traffic rules, circuit breakers, etc. +Making it easy for our Spring Boot applications to consume this data to dynamically configure themselves according the environment. +
Pod Health Indicator