diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/pom.xml b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/pom.xml
new file mode 100644
index 00000000..f95a1bf2
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/pom.xml
@@ -0,0 +1,43 @@
+
+
+ 4.0.0
+
+ org.springframework.cloud
+ kubernetes-circuitbreaker-ribbon-example
+ 0.2.0.BUILD-SNAPSHOT
+
+
+ greeting-service
+ Circuit Breaker & Load Balancer :: Greeting Service
+ Circuit Breaker & Load Balancer :: Greeting Service
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ org.springframework.cloud
+ spring-cloud-starter-ribbon
+
+
+ org.springframework.cloud
+ spring-cloud-starter-hystrix
+
+
+ org.springframework.cloud
+ spring-cloud-starter-kubernetes-netflix
+
+
+ com.squareup.okhttp3
+ okhttp
+
+
+
+
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/fabric8/route.yml b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/fabric8/route.yml
new file mode 100644
index 00000000..d6881f9f
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/fabric8/route.yml
@@ -0,0 +1,10 @@
+apiVersion: v1
+kind: Route
+metadata:
+ name: greeting-service
+spec:
+ port:
+ targetPort: 8080
+ to:
+ kind: Service
+ name: greeting-service
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/GreetingController.java b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/GreetingController.java
new file mode 100644
index 00000000..0183803d
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/GreetingController.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2016 to the original authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.cloud.kubernetes.examples;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Greeting service controller.
+ *
+ * @author Gytis Trikleris
+ */
+@RestController
+public class GreetingController {
+
+ private final NameService nameService;
+
+ public GreetingController(NameService nameService) {
+ this.nameService = nameService;
+ }
+
+ /**
+ * Endpoint to get a greeting. This endpoint uses a name server to get a name for the greeting.
+ *
+ * Request to the name service is guarded with a circuit breaker. Therefore if a name service is not available or is too
+ * slow to response fallback name is used.
+ *
+ * Delay parameter can me used to make name service response slower.
+ *
+ * @param delay Milliseconds for how long the response from name service should be delayed.
+ * @return Greeting string.
+ */
+ @RequestMapping("/greeting")
+ public String getGreeting(@RequestParam(value = "delay", defaultValue = "0") int delay) {
+ return String.format("Hello from %s!", this.nameService.getName(delay));
+ }
+
+}
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/GreetingServiceApplication.java b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/GreetingServiceApplication.java
new file mode 100644
index 00000000..1b7a5c39
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/GreetingServiceApplication.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2016 to the original authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.cloud.kubernetes.examples;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.client.loadbalancer.LoadBalanced;
+import org.springframework.cloud.netflix.ribbon.RibbonClient;
+import org.springframework.context.annotation.Bean;
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * Entry point to the application.
+ *
+ * @author Gytis Trikleris
+ */
+@SpringBootApplication
+@EnableDiscoveryClient
+@EnableCircuitBreaker
+@RibbonClient(name = "name-service", configuration = RibbonConfiguration.class)
+public class GreetingServiceApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(GreetingServiceApplication.class, args);
+ }
+
+ @LoadBalanced
+ @Bean
+ RestTemplate restTemplate() {
+ return new RestTemplate();
+ }
+
+}
+
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameService.java b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameService.java
new file mode 100644
index 00000000..f254ab29
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameService.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2016 to the original authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.cloud.kubernetes.examples;
+
+import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
+import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
+
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * Service invoking name-service via REST and guarded by Hystrix.
+ *
+ * @author Gytis Trikleris
+ */
+@Service
+public class NameService {
+
+ private final RestTemplate restTemplate;
+
+ public NameService(RestTemplate restTemplate) {
+ this.restTemplate = restTemplate;
+ }
+
+ @HystrixCommand(fallbackMethod = "getFallbackName", commandProperties = {
+ @HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "1000")
+ })
+ public String getName(int delay) {
+ return this.restTemplate.getForObject(String.format("http://name-service/name?delay=%d", delay), String.class);
+ }
+
+ private String getFallbackName(int delay) {
+ return "Fallback";
+ }
+
+}
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/RibbonConfiguration.java b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/RibbonConfiguration.java
new file mode 100644
index 00000000..27d537c8
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/RibbonConfiguration.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2016 to the original authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.cloud.kubernetes.examples;
+
+import com.netflix.client.config.IClientConfig;
+import com.netflix.loadbalancer.AvailabilityFilteringRule;
+import com.netflix.loadbalancer.IPing;
+import com.netflix.loadbalancer.IRule;
+import com.netflix.loadbalancer.PingUrl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+
+/**
+ * Ribbon configuration.
+ *
+ * @author Obsidian Quickstarts
+ */
+public class RibbonConfiguration {
+
+ @Autowired
+ IClientConfig ribbonClientConfig;
+
+ /**
+ * PingUrl will ping a URL to check the status of each server.
+ * Say Hello has, as you’ll recall, a method mapped to the /path; that means that Ribbon will get an HTTP 200 response when it pings a running Backend Server
+ *
+ * @param config Client configuration
+ * @return The URL to be used for the Ping
+ */
+ @Bean
+ public IPing ribbonPing(IClientConfig config) {
+ return new PingUrl();
+ }
+
+ /**
+ * AvailabilityFilteringRule will use Ribbon’s built-in circuit breaker functionality to filter out any servers in an “open-circuit” state:
+ * if a ping fails to connect to a given server, or if it gets a read failure for the server, Ribbon will consider that server “dead” until it begins to respond normally.
+ *
+ * @param config Client configuration
+ * @return The Load Balancer rule
+ */
+ @Bean
+ public IRule ribbonRule(IClientConfig config) {
+ return new AvailabilityFilteringRule();
+ }
+}
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/resources/application.yml b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/resources/application.yml
new file mode 100644
index 00000000..57570c47
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/resources/application.yml
@@ -0,0 +1,19 @@
+spring:
+ application:
+ name: greeting-service
+
+server:
+ port: 8080
+
+backend:
+ ribbon:
+ eureka:
+ enabled: false
+ client:
+ enabled: true
+ # We will use Spring Cloud Kubernetes Ribbon to retrieve the list of the servers
+ # listOfServers: backend:8080
+ ServerListRefreshInterval: 15000
+
+hystrix.command.BackendCall.execution.isolation.thread.timeoutInMilliseconds: 30000
+hystrix.threadpool.BackendCallThread.coreSize: 5
\ No newline at end of file
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/pom.xml b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/pom.xml
new file mode 100644
index 00000000..3c963ebe
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/pom.xml
@@ -0,0 +1,27 @@
+
+
+ 4.0.0
+
+ org.springframework.cloud
+ kubernetes-circuitbreaker-ribbon-example
+ 0.2.0.BUILD-SNAPSHOT
+
+
+ name-service
+
+ Circuit Breaker & Load Balancer :: Name Service
+ Circuit Breaker & Load Balancer :: Name Service
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/src/main/fabric8/route.yml b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/src/main/fabric8/route.yml
new file mode 100644
index 00000000..adb5a71a
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/src/main/fabric8/route.yml
@@ -0,0 +1,10 @@
+apiVersion: v1
+kind: Route
+metadata:
+ name: name-service
+spec:
+ port:
+ targetPort: 8080
+ to:
+ kind: Service
+ name: name-service
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameController.java b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameController.java
new file mode 100644
index 00000000..f25a95c0
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameController.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2016-2017 Red Hat, Inc, and individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.cloud.kubernetes.examples;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Name service controller.
+ *
+ * @author Gytis Trikleris
+ */
+@RestController
+public class NameController {
+
+ private static final Logger LOG = LoggerFactory.getLogger(NameController.class);
+
+ private final String hostName = System.getenv("HOSTNAME");
+
+ @RequestMapping("/")
+ public String ribbonPing() {
+ LOG.info("Ribbon ping");
+ return this.hostName;
+ }
+
+ /**
+ * Endpoint to get a name with a capability to delay a response for some number of milliseconds.
+ *
+ * @param delayValue Milliseconds for how long the response should be delayed.
+ * @return Host name.
+ */
+ @RequestMapping("/name")
+ public String getName(@RequestParam(value = "delay", defaultValue = "0") int delayValue) {
+ LOG.info(String.format("Returning a name '%s' with a delay '%d'", this.hostName, delayValue));
+ delay(delayValue);
+ return this.hostName;
+ }
+
+ private void delay(int delayValue) {
+ try {
+ Thread.sleep(delayValue);
+ }
+ catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameServiceApplication.java b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameServiceApplication.java
new file mode 100644
index 00000000..b21dbb40
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameServiceApplication.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2016 to the original authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.cloud.kubernetes.examples;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Entry point to the application.
+ *
+ * @author Gytis Trikleris
+ */
+@SpringBootApplication
+public class NameServiceApplication {
+ public static void main(String[] args) {
+ SpringApplication.run(NameServiceApplication.class, args);
+ }
+}
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/src/main/resources/application.yml b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/src/main/resources/application.yml
new file mode 100644
index 00000000..b08d6019
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/src/main/resources/application.yml
@@ -0,0 +1,6 @@
+spring:
+ application:
+ name: name-service
+
+server:
+ port: 8080
\ No newline at end of file
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/pom.xml b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/pom.xml
new file mode 100644
index 00000000..b5b56cca
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/pom.xml
@@ -0,0 +1,157 @@
+
+
+ 4.0.0
+
+ spring-cloud-kubernetes-examples
+ org.springframework.cloud
+ 0.2.0.BUILD-SNAPSHOT
+
+
+ org.springframework.cloud
+ kubernetes-circuitbreaker-ribbon-example
+ Circuit Breaker & Load Balancer
+ pom
+
+
+ name-service
+ greeting-service
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+ ${maven-deploy-plugin.version}
+
+ true
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring-boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+ io.fabric8
+ fabric8-maven-plugin
+ ${fabric8.maven.plugin.version}
+
+
+ fmp
+
+ resource
+
+
+
+
+
+
+
+
+
+ kubernetes
+
+
+
+ io.fabric8
+ fabric8-maven-plugin
+ ${fabric8.maven.plugin.version}
+
+
+ fmp
+
+ resource
+ build
+
+
+
+
+
+
+
+ NodePort
+
+
+
+
+
+
+
+
+
+ release
+
+
+
+ io.fabric8
+ fabric8-maven-plugin
+ ${fabric8.maven.plugin.version}
+
+
+ fmp
+
+ resource
+ helm
+
+
+
+
+
+
+
+
+
+ integration
+
+
+
+ io.fabric8
+ fabric8-maven-plugin
+ ${fabric8.maven.plugin.version}
+
+
+ fmp
+
+ resource
+ build
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-failsafe-plugin
+ ${maven-failsafe-plugin.version}
+
+
+ run-integration-tests
+ integration-test
+
+ integration-test
+ verify
+
+
+
+
+ false
+ false
+
+
+
+
+
+
+
diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/readme.md b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/readme.md
new file mode 100644
index 00000000..757a9258
--- /dev/null
+++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/readme.md
@@ -0,0 +1,218 @@
+## Kubernetes Circuit Breaker & Load Balancer Example
+
+This example demonstrates how to use [Hystrix circuit breaker](https://martinfowler.com/bliki/CircuitBreaker.html) and the [Ribbon Load Balancing](http://microservices.io/patterns/client-side-discovery.html). The circuit breaker which is backed with Ribbon will check regularly if the target service is still alive. If this is not loner the case, then a fall back process will be excuted. In our case, the REST `greeting service` which is calling the `name Service` responsible to generate the response message will reply a "fallback message" to the client if the `name service` is not longer replying.
+As the Ribbon Kubernetes client is configured within this example, it will fetch from the Kubernetes API Server, the list of the endpoints available for the name service and loadbalance the request between the IP addresses available
+
+### Running the example
+
+The project can be deployed on the Kubernetes or OpenShift platform using the [Minishift](https://github.com/minishift/minishift) or [Minikube](https://kubernetes.io/docs/getting-started-guides/minikube/) tool.
+
+### Build/Deploy using Minikube
+
+First, create a new virtual machine provisioned with Kubernetes on your laptop using the command `minikube start`.
+
+Next, you can compile your project and generate the Kubernetes resources (yaml files containing the definition of the pod, deployment, build, service and route to be created)
+like also to deploy the application on Kubernetes in one maven line :
+
+```
+mvn clean install fabric8:deploy -Dfabric8.generator.from=fabric8/java-jboss-openjdk8-jdk -Pkubernetes
+```
+
+### Call the Greeting service
+
+When maven has finished to compile the code but also to call the platform in order to deploy the yaml files generated and tell to the platform to start the process
+to build/deploy the docker image and create the containers where the Spring Boot application will run 'greeting-service" and "name-service", you will be able to
+check if the pods have been created using this command :
+
+```
+kc get pods
+```
+
+If the status of the Spring Boot pod application is `running` and ready state `1`, then you can
+get the external address IP/Hostname to be used to call the service from your laptop
+
+```
+minikube service --url greeting-service
+```
+
+and then call the service using the curl client
+
+```
+curl http://IP_OR_HOSTNAME/greeting
+```
+
+to get a response as such
+
+```
+Hello from name-service-1-0dzb4!d
+```
+
+### Verify the load balancing
+
+First, scale the number of pods of the `name service` to 2
+
+```
+kc scale --replicas=2 deployment name-service
+```
+
+Wait a few minutes before to issue the curl request to call the Greeting Service to let the platform to create the new pod.
+
+```
+kc get pods --selector=project=name-service
+NAME READY STATUS RESTARTS AGE
+name-service-1652024859-fsnfw 1/1 Running 0 33s
+name-service-1652024859-wrzjs 1/1 Running 0 6m
+```
+
+If you issue the curl request to access the greeting service, you should see that the message response
+contains a different id end of the message which corresponds to the name of the pod.
+
+```
+Hello from name-service-1-0ss0r!
+```
+
+As Ribbon will question the Kubernetes API to get, base on the `name-service` name, the list of IP Addresses assigned to the service as endpoints,
+you should see that you will get a reponse from one of the 2 pods running
+
+```
+kc get endpoints/name-service
+NAME ENDPOINTS AGE
+name-service 172.17.0.5:8080,172.17.0.6:8080 40m
+```
+
+Here is an example about what you will get
+
+```
+curl http://IP_OR_HOSTNAME/greeting
+Hello from name-service-1652024859-hf3xv!
+curl http://IP_OR_HOSTNAME/greeting
+Hello from name-service-1652024859-426kv!
+...
+```
+
+### Test the fall back
+
+In order to test the circuit breaker and the fallback option, you will scale the `name-service` to 0 pods as such
+
+```
+kc scale --replicas=0 deployment name-service
+```
+
+and next issue a new curl request to get the response from the greeting service
+
+```
+Hello from Fallback!
+```
+
+### Build/Deploy using Minishift
+
+First, create a new virtual machine provisioned with OpenShift on your laptop using the command `minishift start`.
+
+Next, log on to the OpenShift platform and next within your terminal use the `oc` client to create a project where
+we will install the circuit breaker and load balancing application
+
+```
+oc new-project circuit-loadbalancing
+```
+
+When using OpenShift, you must assign the `view` role to the *default* service account in the current project in orde to allow our Java Kubernetes Api to access
+the API Server :
+
+```
+oc policy add-role-to-user view --serviceaccount=default
+```
+
+You can now compile your project and generate the OpenShift resources (yaml files containing the definition of the pod, deployment, build, service and route to be created)
+like also to deploy the application on the OpenShift platform in one maven line :
+
+```
+mvn clean install fabric8:deploy -Pkubernetes
+```
+
+### Call the Greeting service
+
+When maven has finished to compile the code but also to call the platform in order to deploy the yaml files generated and tell to the platform to start the process
+to build/deploy the docker image and create the containers where the Spring Boot application will run 'greeting-service" and "name-service", you will be able to
+check if the pods have been created using this command :
+
+```
+oc get pods --selector=project=greeting-service
+```
+
+If the status of the Spring Boot pod application is `running` and ready state `1`, then you can
+get the external address IP/Hostname to be used to call the service from your laptop
+
+```
+oc get route/greeting-service
+```
+
+and then call the service using the curl client
+
+```
+curl http://IP_OR_HOSTNAME/greeting
+```
+
+to get a response as such
+
+```
+Hello from name-service-1-0dzb4!d
+```
+
+### Verify the load balancing
+
+First, scale the number of pods of the `name service` to 2
+
+```
+oc scale --replicas=2 dc name-service
+```
+
+Wait a few minutes before to issue the curl request to call the Greeting Service to let the platform to create the new pod.
+
+```
+oc get pods --selector=project=name-service
+NAME READY STATUS RESTARTS AGE
+name-service-1-0ss0r 1/1 Running 0 3m
+name-service-1-fblp1 1/1 Running 0 36m
+```
+
+If you issue the curl request to access the greeting service, you should see that the message response
+contains a different id end of the message which corresponds to the name of the pod.
+
+```
+Hello from name-service-1-0ss0r!
+```
+
+As Ribbon will question the Kubernetes API to get, base on the `name-service` name, the list of IP Addresses assigned to the service as endpoints,
+you should see that you will get a different response from one of the 2 pods running
+
+```
+oc get endpoints/name-service
+NAME ENDPOINTS AGE
+name-service 172.17.0.2:8080,172.17.0.3:8080 40m
+```
+
+Here is an example about what you will get
+
+```
+curl http://IP_OR_HOSTNAME/greeting
+Hello from name-service-1-0ss0r!
+curl http://IP_OR_HOSTNAME/greeting
+Hello from name-service-1-fblp1!
+...
+```
+
+### Test the fall back
+
+In order to test the circuit breaker and the fallback option, you will scale the `name-service` to 0 pods as such
+
+```
+oc scale --replicas=0 dc name-service
+```
+
+and next issue a new curl request to get the response from the greeting service
+
+```
+Hello from Fallback!
+```
+
+
diff --git a/spring-cloud-kubernetes-examples/kubernetes-reload-example/readme.md b/spring-cloud-kubernetes-examples/kubernetes-reload-example/readme.md
index 2d784f03..d3c54216 100644
--- a/spring-cloud-kubernetes-examples/kubernetes-reload-example/readme.md
+++ b/spring-cloud-kubernetes-examples/kubernetes-reload-example/readme.md
@@ -16,7 +16,7 @@ oc policy add-role-to-user view --serviceaccount=default
You can deploy the application using the fabric8 maven plugin:
```
-mvn clean install fabric8:build fabric8:deploy
+mvn clean install fabric8:build fabric8:deploy -Pintegration
```
### Changing the configuration
diff --git a/spring-cloud-kubernetes-examples/pom.xml b/spring-cloud-kubernetes-examples/pom.xml
index 01e13940..017aea67 100644
--- a/spring-cloud-kubernetes-examples/pom.xml
+++ b/spring-cloud-kubernetes-examples/pom.xml
@@ -2,12 +2,12 @@
+ 4.0.0
spring-cloud-kubernetes
org.springframework.cloud
0.2.0.BUILD-SNAPSHOT
- 4.0.0
spring-cloud-kubernetes-examples
pom
@@ -18,7 +18,7 @@
kubernetes-reload-example
kubernetes-hello-world-example
+ kubernetes-circuitbreaker-ribbon-example
-