Spring Cloud on Kubernetes
October 7–10, 2019
Austin Convention Center
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Safe Harbor Statement
The following is intended to outline the general direction of Pivotal's offerings. It is intended for information
purposes only and may not be incorporated into any contract. Any information regarding pre-release of
Pivotal offerings, future updates or other planned modifications is subject to ongoing evaluation by Pivotal
and is subject to change. This information is provided without warranty or any kind, express or implied, and
is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making
purchasing decisions regarding Pivotal's offerings. These purchasing decisions should only be based on
features currently available. The development, release, and timing of any features or functionality described
for Pivotal's offerings in this presentation remain at the sole discretion of Pivotal. Pivotal has no obligation to
update forward looking information in this presentation.
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Who are we?
➔ Alexandre Roman
Platform Architect, Pivotal (Paris)
aroman@pivotal.io
github.com/alexandreroman
@Alexandre_Roman
➔ Ryan Baxter
Spring Cloud Software Engineer, Pivotal (Boston)
github.com/ryanjbaxter
@ryanjbaxter
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Agenda
Who are we?
What is Spring Cloud Kubernetes?
Demo time!
“Native Kubernetes Implementations”
4
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
You have choices
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Deployment choices Doesn’t
Matter
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring Boot and Containers
https://spring.io/guides/gs/spring-boot-docker/
But the management…...
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What About Kubernetes?
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring Boot + Cloud & Docker + Kubernetes
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What is Spring Cloud Kubernetes?
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Why Spring Cloud Kubernetes?
Write portable apps using Spring Cloud
➔ Same source code for different environments
➔ No matter which environment you use, Spring Cloud provides the right platform abstraction
➔ Seamless integration between Kubernetes and Spring
➔ Spring Cloud Kubernetes is GA since February 2019
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring Cloud nicely fits with Kubernetes
ConfigMap/Secret support
➔ Hot reload your app when you
update your configuration
➔ Inject external configuration
properties using ConfigMap
➔ Map Spring config support with
ConfigMap: @Values,
@ConfigurationPropertie
s
➔ Load Secret values into your
beans
Native service discovery
➔ Leverage Spring Cloud Netflix,
without using an Eureka
instance
➔ DiscoveryClient uses
Kubernetes DNS resolver and
cluster events
➔ Use @LoadBalanced and
LoadBalancerClient for
client-side load balancing
across running pods
➔ Spring Cloud Circuitbreaker
support (Hystrix and
Resilience4j)
Pod health indicator
➔ Pod health indicator contributes
to Health actuator:
/actuator/health
Kubernetes awareness
➔ When your app is running in
Kubernetes, profile
kubernetes is automatically
enabled for custom
configuration
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What you’re about to see
Deploy a Cloud-native app to Kubernetes
➔ Deployment Generation
➔ Service Discovery
➔ Load Balancing
➔ Configuration
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Demo time!
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Do I need Spring Cloud Kubernetes?
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Under the covers
App
Spring Cloud
K8S
K8S API Server
K8S API
Client
This requires the App
to have permissions to
use the K8S API
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Use what is right for the situation
Use Spring Cloud Kubernetes
➔ Existing Spring Cloud apps
◆ Uses client side load balancing
◆ Uses Discovery Client
➔ Is OK to use the Kubernetes API server directly
Use Kubernetes
➔ Just planning on running on Kubernetes
➔ Familiar with Kubernetes
Stay Connected.
@ryanjbaxter
@Alexandre_Roman
Best Practices to Spring to Kubernetes Easier and Faster - Tuesday, 2pm
Source code: github.com/ryanjbaxter/spring-cloud-k8s-demo
#springone@s1p

Spring Cloud on Kubernetes

  • 1.
    Spring Cloud onKubernetes October 7–10, 2019 Austin Convention Center
  • 2.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Safe Harbor Statement The following is intended to outline the general direction of Pivotal's offerings. It is intended for information purposes only and may not be incorporated into any contract. Any information regarding pre-release of Pivotal offerings, future updates or other planned modifications is subject to ongoing evaluation by Pivotal and is subject to change. This information is provided without warranty or any kind, express or implied, and is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions regarding Pivotal's offerings. These purchasing decisions should only be based on features currently available. The development, release, and timing of any features or functionality described for Pivotal's offerings in this presentation remain at the sole discretion of Pivotal. Pivotal has no obligation to update forward looking information in this presentation.
  • 3.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Who are we? ➔ Alexandre Roman Platform Architect, Pivotal (Paris) aroman@pivotal.io github.com/alexandreroman @Alexandre_Roman ➔ Ryan Baxter Spring Cloud Software Engineer, Pivotal (Boston) github.com/ryanjbaxter @ryanjbaxter
  • 4.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Agenda Who are we? What is Spring Cloud Kubernetes? Demo time! “Native Kubernetes Implementations” 4
  • 5.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ You have choices
  • 6.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Deployment choices Doesn’t Matter
  • 7.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Boot and Containers https://spring.io/guides/gs/spring-boot-docker/ But the management…...
  • 8.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What About Kubernetes?
  • 9.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Boot + Cloud & Docker + Kubernetes
  • 10.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is Spring Cloud Kubernetes?
  • 11.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Why Spring Cloud Kubernetes? Write portable apps using Spring Cloud ➔ Same source code for different environments ➔ No matter which environment you use, Spring Cloud provides the right platform abstraction ➔ Seamless integration between Kubernetes and Spring ➔ Spring Cloud Kubernetes is GA since February 2019
  • 12.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud nicely fits with Kubernetes ConfigMap/Secret support ➔ Hot reload your app when you update your configuration ➔ Inject external configuration properties using ConfigMap ➔ Map Spring config support with ConfigMap: @Values, @ConfigurationPropertie s ➔ Load Secret values into your beans Native service discovery ➔ Leverage Spring Cloud Netflix, without using an Eureka instance ➔ DiscoveryClient uses Kubernetes DNS resolver and cluster events ➔ Use @LoadBalanced and LoadBalancerClient for client-side load balancing across running pods ➔ Spring Cloud Circuitbreaker support (Hystrix and Resilience4j) Pod health indicator ➔ Pod health indicator contributes to Health actuator: /actuator/health Kubernetes awareness ➔ When your app is running in Kubernetes, profile kubernetes is automatically enabled for custom configuration
  • 13.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What you’re about to see Deploy a Cloud-native app to Kubernetes ➔ Deployment Generation ➔ Service Discovery ➔ Load Balancing ➔ Configuration
  • 14.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo time!
  • 15.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Do I need Spring Cloud Kubernetes?
  • 16.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Under the covers App Spring Cloud K8S K8S API Server K8S API Client This requires the App to have permissions to use the K8S API
  • 17.
    Unless otherwise indicated,these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Use what is right for the situation Use Spring Cloud Kubernetes ➔ Existing Spring Cloud apps ◆ Uses client side load balancing ◆ Uses Discovery Client ➔ Is OK to use the Kubernetes API server directly Use Kubernetes ➔ Just planning on running on Kubernetes ➔ Familiar with Kubernetes
  • 18.
    Stay Connected. @ryanjbaxter @Alexandre_Roman Best Practicesto Spring to Kubernetes Easier and Faster - Tuesday, 2pm Source code: github.com/ryanjbaxter/spring-cloud-k8s-demo #springone@s1p