SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
Spring Boot loves k8s
September 2–3, 2020
springone.io
#session-spring-boot-loves-k8s on Slack
1
Stéphane Nicoll @snicoll
Brian Clozel @bclozel
Safe Harbor Statement
The following is intended to outline the general direction of VMware's offerings. It is intended for
information purposes only and may not be incorporated into any contract. Any information regarding
pre-release of VMware offerings, future updates or other planned modifications is subject to ongoing
evaluation by VMware 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 VMware'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 VMware's offerings in this presentation remain
at the sole discretion of Pivotal. Pivotal has no obligation to update forward looking information in this
presentation.
2
k8s implementation details
Distributed systems best practices
Natural deployment to k8s
Agenda
Showcasing Spring Boot 2.3 features during a live coding session
● The “Scribe” application
● Efficient Container images
● Liveness and Readiness
● Graceful Shutdown
● Next in Spring Boot 2.4+
6
Markdown editor with spell check
7
Markdown editor with spell check
7
Markdown editor with spell check
7
Markdown editor with spell check
7
A distributed system!
8
Scribe MarkdownConverter
● Web UI
● Spell check
● Calls Converter +
Fallback
● HTTP endpoint
● Markdown to
HTML
Efficient Container images
Very Basic Dockerfile for Java apps
10
FROM openjdk:8-jre-alpine
WORKDIR application
ARG JAR_FILE=scribe/target/scribe-*.jar
COPY ${JAR_FILE} application.jar
ENTRYPOINT ["java","-jar","application.jar"]
Layers in Container images
11
FROM … [FROM CACHE]
COPY … [FROM CACHE]
COPY … [REBUILDING]
RUN …
Layers represent changes/intermediate images (like git commits)
When rebuilding an image, layers
can be cached and reused if their
content did not change.
Optimizing Container images
12
FROM … [FROM CACHE]
COPY application.jar [REBUILDING]
Regrouping resources with similar lifecycle will improve
image build time and storage efficiency.
In our current Dockerfile, the entire
layer needs to be rebuilt for any
change in the application
https://github.com/wagoodman/dive
13
https://github.com/wagoodman/dive
13
14
Anatomy of a Spring Boot Jar
6
.
├── BOOT-INF
│   ├── classes
│   │   ├── application.properties
│   │   ├── io/spring/sample/scribe
│   │   │  ├── EditorController.class
│   │   │   ├── ScribeApplication.class
│   │   │   ├── …
│   └── lib
│   ├── bulma-0.9.0.jar
│   ├── jackson-databind-2.11.2.jar
│   ├── spring-boot-2.3.3.RELEASE.jar
14
Anatomy of a Spring Boot Jar
6
│   │   │   ├── ScribeApplication.class
│   │   │   ├── …
│   └── lib
│   ├── bulma-0.9.0.jar
│   ├── jackson-databind-2.11.2.jar
│   ├── spring-boot-2.3.3.RELEASE.jar
│   ├── …
├── META-INF
│   ├── MANIFEST.MF
│   └── spring-configuration-metadata.json
└── org/springframework/boot/loader
├── ClassPathIndexFile.class
├── JarLauncher.class
├── …
Layered container images
15
FROM …
COPY --from=builder source/snapshot-dependencies/ ./
COPY --from=builder source/spring-boot-loader/ ./
COPY --from=builder source/dependencies/ ./
Spring Boot can build efficient container images.
Developers can customize
the layer arrangement and
reorder, add their own…
Using the Maven/Gradle
build plugins.
COPY --from=builder source/application/ ./
Spring Boot + Buildpacks
No Dockerfile required!
Build locally with the CLI:
16
./mvnw spring-boot:build-image
./gradlew bootBuildImage
Also, delegate to your company’s builder instance in your build pipeline.
Cloud Native Buildpacks
With buildpacks.io, you can delegate container image building for:
• Balanced control between app devs and platform operators
• Security and compliance requirements handled in one place
• Easier maintenance/upgrades
17
What about other solutions?
Buildpacks, Dockerfiles, Jib, s2i, ko…
They have different approaches and features,
see https://buildpacks.io/features/
Choose what fits best for your team!
18
Next: Spring to image
Later today, check out the “Spring to image” session with Ben Hale.
https://springone.io/2020/sessions/spring-to-image
This session will cover Spring Boot build plugins, the pack CLI, the kpack
Kubernetes service and more!
19
Liveness and Readiness
20
Liveness and Readiness
1. New concepts supported in Spring Boot core.
2. Complement the existing application Health support in Actuator.
3.Empower developers with ApplicationAvailability.
21
Liveness and Readiness states
Liveness
“CORRECT” if the internal state of
the app is fine. External
dependencies or the service
itself might not respond
correctly still.
“BROKEN” if the internal state of
the application is broken and
restarting is the only way to fix
it.
22
Readiness
“ACCEPTING_TRAFFIC” is a way
to tell load balancers that the
app is ready to serve requests.
The app is “REFUSING_TRAFFIC”
if it considers that its load is too
high, or depending on its
lifecycle stage (starting up,
shutting down).
Liveness and Readiness Probes
Liveness and Readiness states are available as health groups.
Enabled automatically on k8s, or with the config property:
23
https://example.org/actuator/health/liveness
https://example.org/actuator/health/readiness
Probes are available here and in sync with the application lifecycle:
management.endpoint.health.probes.enabled=true
Probes as Health Groups
Liveness and readiness probes are using the Health Groups feature.
You can configure additional checks to a probe:
24
management.endpoint.health.group.readiness.include=readinessState,customCheck
⚠ You should be careful about checking for external state in probes.
ApplicationAvailability
25
@Component
public class LocalCacheVerifier {
private final ApplicationEventPublisher eventPublisher;
public void checkLocalCache() {
try { //...
} catch (CacheCompletelyBrokenException ex) {
AvailabilityChangeEvent.publish(this.eventPublisher, ex, LivenessState.BROKEN);
}
}
} // see more in reference docs
Graceful Shutdown
26
Shutting down app with active requests
27
Scribe
MarkdownConverter
MarkdownConverter
MarkdownConverter
HTTP POST /convert
1. Processing…
Shutting down app with active requests
27
Scribe
MarkdownConverter
MarkdownConverter
MarkdownConverter
HTTP POST /convert
1. Processing…
2. Shutdown!
Graceful Shutdown
28
Scribe
MarkdownConverter
HTTP POST /convert
1. Processing…
MarkdownConverter
MarkdownConverter
Graceful Shutdown
28
Scribe
MarkdownConverter
HTTP POST /convert
1. Processing…
2. Stop accepting
MarkdownConverter
MarkdownConverter
Graceful Shutdown
28
Scribe
MarkdownConverter
HTTP POST /convert
1. Processing…
3. Done
2. Stop accepting
MarkdownConverter
MarkdownConverter
Graceful Shutdown
28
Scribe
MarkdownConverter
HTTP POST /convert
1. Processing…
3. Done
2. Stop accepting
MarkdownConverter
MarkdownConverter
4.Shutdown!
Configuring Graceful Shutdown
Enabling Graceful Shutdown and configuring the grace period:
29
server.shutdown=graceful
spring.lifecycle.timeout-per-shutdown-phase=20s
Next in Spring Boot 2.4+
30
Config file processing
Volume mounted configuration trees, multi-document properties files,
profile groups, etc. See config file processing blog post.
31
spring.config.activate.on-cloud-platform=kubernetes
spring.config.import=configtree:/etc/config
spring.config.activate.on-cloud-platform=kubernetes
spring.config.import=configtree:/etc/config
spring.config.activate.on-cloud-platform=kubernetes
spring.config.import=configtree:/etc/config
spring.config.activate.on-cloud-platform=kubernetes
spring.config.import=configtree:/etc/config
spring.config.activate.on-cloud-platform=kubernetes
spring.config.import=configtree:/etc/config
etc/
+- config/
+- my/
| +- application
+- test
Graceful shutdown improvements
The team is considering adding a shutdown delay option because most
platforms still route traffic to while routing state is converging.
Currently you can use a PreStop hook to delay the shutdown sequence.
32
Layered JARs enabled by default
As of 2.4.0, Spring Boot JARs will ship with the layers.idx by default.
Useful metadata for tools in your CI/CD pipeline.
33
Stay Connected.
Q&A #session-spring-boot-loves-k8s on Slack
“Spring to Image” session with Ben Hale
Slides and code:
https://springone.io/2020/sessions/spring-boot-loves-k8s
https://github.com/snicoll/spring-boot-loves-k8s
#springone@s1p

Weitere ähnliche Inhalte

Was ist angesagt?

The Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native ApplicationsThe Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native ApplicationsVMware Tanzu
 
What’s New in Spring Data MongoDB
What’s New in Spring Data MongoDBWhat’s New in Spring Data MongoDB
What’s New in Spring Data MongoDBVMware Tanzu
 
State of Steeltoe 2020
State of Steeltoe 2020State of Steeltoe 2020
State of Steeltoe 2020VMware Tanzu
 
Developers Are Users, Too
Developers Are Users, TooDevelopers Are Users, Too
Developers Are Users, TooVMware Tanzu
 
Full Steam Ahead, R2DBC!
Full Steam Ahead, R2DBC!Full Steam Ahead, R2DBC!
Full Steam Ahead, R2DBC!VMware Tanzu
 
Spring: Your Next Java Micro-Framework
Spring: Your Next Java Micro-FrameworkSpring: Your Next Java Micro-Framework
Spring: Your Next Java Micro-FrameworkVMware Tanzu
 
Not Just Initializing
Not Just InitializingNot Just Initializing
Not Just InitializingVMware Tanzu
 
Accelerate Spring Apps to Cloud at Scale
Accelerate Spring Apps to Cloud at ScaleAccelerate Spring Apps to Cloud at Scale
Accelerate Spring Apps to Cloud at ScaleAsir Selvasingh
 
Fundamental Spring Boot: Keep it Simple, Get it Right, Be Productive and Have...
Fundamental Spring Boot: Keep it Simple, Get it Right, Be Productive and Have...Fundamental Spring Boot: Keep it Simple, Get it Right, Be Productive and Have...
Fundamental Spring Boot: Keep it Simple, Get it Right, Be Productive and Have...VMware Tanzu
 
Spring Data JDBC: Beyond the Obvious
Spring Data JDBC: Beyond the ObviousSpring Data JDBC: Beyond the Obvious
Spring Data JDBC: Beyond the ObviousVMware Tanzu
 
PKS: The What and How of Enterprise-Grade Kubernetes
PKS: The What and How of Enterprise-Grade KubernetesPKS: The What and How of Enterprise-Grade Kubernetes
PKS: The What and How of Enterprise-Grade KubernetesVMware Tanzu
 
Bulletproof Microservices with Spring and Kubernetes
Bulletproof Microservices with Spring and KubernetesBulletproof Microservices with Spring and Kubernetes
Bulletproof Microservices with Spring and KubernetesVMware Tanzu
 
DevOps KPIs as a Service: Daimler’s Solution
DevOps KPIs as a Service: Daimler’s SolutionDevOps KPIs as a Service: Daimler’s Solution
DevOps KPIs as a Service: Daimler’s SolutionVMware Tanzu
 
Next-Generation Cloud Native Apps with Spring Cloud and Kubernetes
Next-Generation Cloud Native Apps with Spring Cloud and KubernetesNext-Generation Cloud Native Apps with Spring Cloud and Kubernetes
Next-Generation Cloud Native Apps with Spring Cloud and KubernetesVMware Tanzu
 
Spring Tools 4: Bootiful Spring Tooling for the Masses
Spring Tools 4: Bootiful Spring Tooling for the MassesSpring Tools 4: Bootiful Spring Tooling for the Masses
Spring Tools 4: Bootiful Spring Tooling for the MassesVMware Tanzu
 
Delivering Essentials for Albertsons: VMware TAS’s Critical Role During the C...
Delivering Essentials for Albertsons: VMware TAS’s Critical Role During the C...Delivering Essentials for Albertsons: VMware TAS’s Critical Role During the C...
Delivering Essentials for Albertsons: VMware TAS’s Critical Role During the C...VMware Tanzu
 
VMware Tanzu Introduction- June 11, 2020
VMware Tanzu Introduction- June 11, 2020VMware Tanzu Introduction- June 11, 2020
VMware Tanzu Introduction- June 11, 2020VMware Tanzu
 

Was ist angesagt? (20)

The Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native ApplicationsThe Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native Applications
 
What’s New in Spring Data MongoDB
What’s New in Spring Data MongoDBWhat’s New in Spring Data MongoDB
What’s New in Spring Data MongoDB
 
State of Steeltoe 2020
State of Steeltoe 2020State of Steeltoe 2020
State of Steeltoe 2020
 
What Is Spring?
What Is Spring?What Is Spring?
What Is Spring?
 
Developers Are Users, Too
Developers Are Users, TooDevelopers Are Users, Too
Developers Are Users, Too
 
Full Steam Ahead, R2DBC!
Full Steam Ahead, R2DBC!Full Steam Ahead, R2DBC!
Full Steam Ahead, R2DBC!
 
Spring: Your Next Java Micro-Framework
Spring: Your Next Java Micro-FrameworkSpring: Your Next Java Micro-Framework
Spring: Your Next Java Micro-Framework
 
Not Just Initializing
Not Just InitializingNot Just Initializing
Not Just Initializing
 
Accelerate Spring Apps to Cloud at Scale
Accelerate Spring Apps to Cloud at ScaleAccelerate Spring Apps to Cloud at Scale
Accelerate Spring Apps to Cloud at Scale
 
Fundamental Spring Boot: Keep it Simple, Get it Right, Be Productive and Have...
Fundamental Spring Boot: Keep it Simple, Get it Right, Be Productive and Have...Fundamental Spring Boot: Keep it Simple, Get it Right, Be Productive and Have...
Fundamental Spring Boot: Keep it Simple, Get it Right, Be Productive and Have...
 
Spring Data JDBC: Beyond the Obvious
Spring Data JDBC: Beyond the ObviousSpring Data JDBC: Beyond the Obvious
Spring Data JDBC: Beyond the Obvious
 
PKS: The What and How of Enterprise-Grade Kubernetes
PKS: The What and How of Enterprise-Grade KubernetesPKS: The What and How of Enterprise-Grade Kubernetes
PKS: The What and How of Enterprise-Grade Kubernetes
 
Bulletproof Microservices with Spring and Kubernetes
Bulletproof Microservices with Spring and KubernetesBulletproof Microservices with Spring and Kubernetes
Bulletproof Microservices with Spring and Kubernetes
 
DevOps KPIs as a Service: Daimler’s Solution
DevOps KPIs as a Service: Daimler’s SolutionDevOps KPIs as a Service: Daimler’s Solution
DevOps KPIs as a Service: Daimler’s Solution
 
Next-Generation Cloud Native Apps with Spring Cloud and Kubernetes
Next-Generation Cloud Native Apps with Spring Cloud and KubernetesNext-Generation Cloud Native Apps with Spring Cloud and Kubernetes
Next-Generation Cloud Native Apps with Spring Cloud and Kubernetes
 
Spring to Image
Spring to ImageSpring to Image
Spring to Image
 
From Monolith to K8s - Spring One 2020
From Monolith to K8s - Spring One 2020From Monolith to K8s - Spring One 2020
From Monolith to K8s - Spring One 2020
 
Spring Tools 4: Bootiful Spring Tooling for the Masses
Spring Tools 4: Bootiful Spring Tooling for the MassesSpring Tools 4: Bootiful Spring Tooling for the Masses
Spring Tools 4: Bootiful Spring Tooling for the Masses
 
Delivering Essentials for Albertsons: VMware TAS’s Critical Role During the C...
Delivering Essentials for Albertsons: VMware TAS’s Critical Role During the C...Delivering Essentials for Albertsons: VMware TAS’s Critical Role During the C...
Delivering Essentials for Albertsons: VMware TAS’s Critical Role During the C...
 
VMware Tanzu Introduction- June 11, 2020
VMware Tanzu Introduction- June 11, 2020VMware Tanzu Introduction- June 11, 2020
VMware Tanzu Introduction- June 11, 2020
 

Ähnlich wie Spring Boot Loves K8s

Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)VMware Tanzu
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOTVMware Tanzu
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topicKalkey
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoringOracle Korea
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringDonghuKIM2
 
VMworld Europe 2014: A DevOps Story - Unlocking the Power of Docker with the ...
VMworld Europe 2014: A DevOps Story - Unlocking the Power of Docker with the ...VMworld Europe 2014: A DevOps Story - Unlocking the Power of Docker with the ...
VMworld Europe 2014: A DevOps Story - Unlocking the Power of Docker with the ...VMworld
 
給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗William Yeh
 
Pivotal Platform - December Release A First Look
Pivotal Platform - December Release A First LookPivotal Platform - December Release A First Look
Pivotal Platform - December Release A First LookVMware Tanzu
 
JOIN 2022: Patching 3rd party software Like a boss
JOIN 2022: Patching 3rd party software Like a bossJOIN 2022: Patching 3rd party software Like a boss
JOIN 2022: Patching 3rd party software Like a bossPieter Vincken
 
2015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.02015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.0mnriem
 
Extending Kubernetes with Operators
Extending Kubernetes with OperatorsExtending Kubernetes with Operators
Extending Kubernetes with Operatorspeychevi
 
A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix Rohit Kelapure
 
You've Made Kubernetes Available to Your Developers, Now What?
You've Made Kubernetes Available to Your Developers, Now What?You've Made Kubernetes Available to Your Developers, Now What?
You've Made Kubernetes Available to Your Developers, Now What?cornelia davis
 
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...Oleg Shalygin
 
Whats new in Enterprise 5.0 Product Suite
Whats new in Enterprise 5.0 Product SuiteWhats new in Enterprise 5.0 Product Suite
Whats new in Enterprise 5.0 Product SuiteMicro Focus
 
Kubernetes for the VI Admin
Kubernetes for the VI AdminKubernetes for the VI Admin
Kubernetes for the VI AdminKendrick Coleman
 
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...Codemotion
 
Technology Primer: Closing the DevOps Loop by Integrating CA Application Perf...
Technology Primer: Closing the DevOps Loop by Integrating CA Application Perf...Technology Primer: Closing the DevOps Loop by Integrating CA Application Perf...
Technology Primer: Closing the DevOps Loop by Integrating CA Application Perf...CA Technologies
 
HDinsight Workshop - Prerequisite Activity
HDinsight Workshop - Prerequisite ActivityHDinsight Workshop - Prerequisite Activity
HDinsight Workshop - Prerequisite ActivityIdan Tohami
 
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server Simone Morellato
 

Ähnlich wie Spring Boot Loves K8s (20)

Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoring
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics Monitoring
 
VMworld Europe 2014: A DevOps Story - Unlocking the Power of Docker with the ...
VMworld Europe 2014: A DevOps Story - Unlocking the Power of Docker with the ...VMworld Europe 2014: A DevOps Story - Unlocking the Power of Docker with the ...
VMworld Europe 2014: A DevOps Story - Unlocking the Power of Docker with the ...
 
給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗
 
Pivotal Platform - December Release A First Look
Pivotal Platform - December Release A First LookPivotal Platform - December Release A First Look
Pivotal Platform - December Release A First Look
 
JOIN 2022: Patching 3rd party software Like a boss
JOIN 2022: Patching 3rd party software Like a bossJOIN 2022: Patching 3rd party software Like a boss
JOIN 2022: Patching 3rd party software Like a boss
 
2015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.02015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.0
 
Extending Kubernetes with Operators
Extending Kubernetes with OperatorsExtending Kubernetes with Operators
Extending Kubernetes with Operators
 
A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix
 
You've Made Kubernetes Available to Your Developers, Now What?
You've Made Kubernetes Available to Your Developers, Now What?You've Made Kubernetes Available to Your Developers, Now What?
You've Made Kubernetes Available to Your Developers, Now What?
 
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
 
Whats new in Enterprise 5.0 Product Suite
Whats new in Enterprise 5.0 Product SuiteWhats new in Enterprise 5.0 Product Suite
Whats new in Enterprise 5.0 Product Suite
 
Kubernetes for the VI Admin
Kubernetes for the VI AdminKubernetes for the VI Admin
Kubernetes for the VI Admin
 
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
 
Technology Primer: Closing the DevOps Loop by Integrating CA Application Perf...
Technology Primer: Closing the DevOps Loop by Integrating CA Application Perf...Technology Primer: Closing the DevOps Loop by Integrating CA Application Perf...
Technology Primer: Closing the DevOps Loop by Integrating CA Application Perf...
 
HDinsight Workshop - Prerequisite Activity
HDinsight Workshop - Prerequisite ActivityHDinsight Workshop - Prerequisite Activity
HDinsight Workshop - Prerequisite Activity
 
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server
 

Mehr von VMware Tanzu

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItVMware Tanzu
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023VMware Tanzu
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleVMware Tanzu
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023VMware Tanzu
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductVMware Tanzu
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready AppsVMware Tanzu
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And BeyondVMware Tanzu
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfVMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023VMware Tanzu
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptxVMware Tanzu
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchVMware Tanzu
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishVMware Tanzu
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVMware Tanzu
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - FrenchVMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023VMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootVMware Tanzu
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerVMware Tanzu
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeVMware Tanzu
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsVMware Tanzu
 

Mehr von VMware Tanzu (20)

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
 

Kürzlich hochgeladen

CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 

Kürzlich hochgeladen (20)

CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 

Spring Boot Loves K8s

  • 1. Spring Boot loves k8s September 2–3, 2020 springone.io #session-spring-boot-loves-k8s on Slack 1 Stéphane Nicoll @snicoll Brian Clozel @bclozel
  • 2. Safe Harbor Statement The following is intended to outline the general direction of VMware's offerings. It is intended for information purposes only and may not be incorporated into any contract. Any information regarding pre-release of VMware offerings, future updates or other planned modifications is subject to ongoing evaluation by VMware 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 VMware'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 VMware's offerings in this presentation remain at the sole discretion of Pivotal. Pivotal has no obligation to update forward looking information in this presentation. 2
  • 6. Agenda Showcasing Spring Boot 2.3 features during a live coding session ● The “Scribe” application ● Efficient Container images ● Liveness and Readiness ● Graceful Shutdown ● Next in Spring Boot 2.4+ 6
  • 7. Markdown editor with spell check 7
  • 8. Markdown editor with spell check 7
  • 9. Markdown editor with spell check 7
  • 10. Markdown editor with spell check 7
  • 11. A distributed system! 8 Scribe MarkdownConverter ● Web UI ● Spell check ● Calls Converter + Fallback ● HTTP endpoint ● Markdown to HTML
  • 13. Very Basic Dockerfile for Java apps 10 FROM openjdk:8-jre-alpine WORKDIR application ARG JAR_FILE=scribe/target/scribe-*.jar COPY ${JAR_FILE} application.jar ENTRYPOINT ["java","-jar","application.jar"]
  • 14. Layers in Container images 11 FROM … [FROM CACHE] COPY … [FROM CACHE] COPY … [REBUILDING] RUN … Layers represent changes/intermediate images (like git commits) When rebuilding an image, layers can be cached and reused if their content did not change.
  • 15. Optimizing Container images 12 FROM … [FROM CACHE] COPY application.jar [REBUILDING] Regrouping resources with similar lifecycle will improve image build time and storage efficiency. In our current Dockerfile, the entire layer needs to be rebuilt for any change in the application
  • 18. 14 Anatomy of a Spring Boot Jar 6 . ├── BOOT-INF │   ├── classes │   │   ├── application.properties │   │   ├── io/spring/sample/scribe │   │   │  ├── EditorController.class │   │   │   ├── ScribeApplication.class │   │   │   ├── … │   └── lib │   ├── bulma-0.9.0.jar │   ├── jackson-databind-2.11.2.jar │   ├── spring-boot-2.3.3.RELEASE.jar
  • 19. 14 Anatomy of a Spring Boot Jar 6 │   │   │   ├── ScribeApplication.class │   │   │   ├── … │   └── lib │   ├── bulma-0.9.0.jar │   ├── jackson-databind-2.11.2.jar │   ├── spring-boot-2.3.3.RELEASE.jar │   ├── … ├── META-INF │   ├── MANIFEST.MF │   └── spring-configuration-metadata.json └── org/springframework/boot/loader ├── ClassPathIndexFile.class ├── JarLauncher.class ├── …
  • 20. Layered container images 15 FROM … COPY --from=builder source/snapshot-dependencies/ ./ COPY --from=builder source/spring-boot-loader/ ./ COPY --from=builder source/dependencies/ ./ Spring Boot can build efficient container images. Developers can customize the layer arrangement and reorder, add their own… Using the Maven/Gradle build plugins. COPY --from=builder source/application/ ./
  • 21. Spring Boot + Buildpacks No Dockerfile required! Build locally with the CLI: 16 ./mvnw spring-boot:build-image ./gradlew bootBuildImage Also, delegate to your company’s builder instance in your build pipeline.
  • 22. Cloud Native Buildpacks With buildpacks.io, you can delegate container image building for: • Balanced control between app devs and platform operators • Security and compliance requirements handled in one place • Easier maintenance/upgrades 17
  • 23. What about other solutions? Buildpacks, Dockerfiles, Jib, s2i, ko… They have different approaches and features, see https://buildpacks.io/features/ Choose what fits best for your team! 18
  • 24. Next: Spring to image Later today, check out the “Spring to image” session with Ben Hale. https://springone.io/2020/sessions/spring-to-image This session will cover Spring Boot build plugins, the pack CLI, the kpack Kubernetes service and more! 19
  • 26. Liveness and Readiness 1. New concepts supported in Spring Boot core. 2. Complement the existing application Health support in Actuator. 3.Empower developers with ApplicationAvailability. 21
  • 27. Liveness and Readiness states Liveness “CORRECT” if the internal state of the app is fine. External dependencies or the service itself might not respond correctly still. “BROKEN” if the internal state of the application is broken and restarting is the only way to fix it. 22 Readiness “ACCEPTING_TRAFFIC” is a way to tell load balancers that the app is ready to serve requests. The app is “REFUSING_TRAFFIC” if it considers that its load is too high, or depending on its lifecycle stage (starting up, shutting down).
  • 28. Liveness and Readiness Probes Liveness and Readiness states are available as health groups. Enabled automatically on k8s, or with the config property: 23 https://example.org/actuator/health/liveness https://example.org/actuator/health/readiness Probes are available here and in sync with the application lifecycle: management.endpoint.health.probes.enabled=true
  • 29. Probes as Health Groups Liveness and readiness probes are using the Health Groups feature. You can configure additional checks to a probe: 24 management.endpoint.health.group.readiness.include=readinessState,customCheck ⚠ You should be careful about checking for external state in probes.
  • 30. ApplicationAvailability 25 @Component public class LocalCacheVerifier { private final ApplicationEventPublisher eventPublisher; public void checkLocalCache() { try { //... } catch (CacheCompletelyBrokenException ex) { AvailabilityChangeEvent.publish(this.eventPublisher, ex, LivenessState.BROKEN); } } } // see more in reference docs
  • 32. Shutting down app with active requests 27 Scribe MarkdownConverter MarkdownConverter MarkdownConverter HTTP POST /convert 1. Processing…
  • 33. Shutting down app with active requests 27 Scribe MarkdownConverter MarkdownConverter MarkdownConverter HTTP POST /convert 1. Processing… 2. Shutdown!
  • 34. Graceful Shutdown 28 Scribe MarkdownConverter HTTP POST /convert 1. Processing… MarkdownConverter MarkdownConverter
  • 35. Graceful Shutdown 28 Scribe MarkdownConverter HTTP POST /convert 1. Processing… 2. Stop accepting MarkdownConverter MarkdownConverter
  • 36. Graceful Shutdown 28 Scribe MarkdownConverter HTTP POST /convert 1. Processing… 3. Done 2. Stop accepting MarkdownConverter MarkdownConverter
  • 37. Graceful Shutdown 28 Scribe MarkdownConverter HTTP POST /convert 1. Processing… 3. Done 2. Stop accepting MarkdownConverter MarkdownConverter 4.Shutdown!
  • 38. Configuring Graceful Shutdown Enabling Graceful Shutdown and configuring the grace period: 29 server.shutdown=graceful spring.lifecycle.timeout-per-shutdown-phase=20s
  • 39. Next in Spring Boot 2.4+ 30
  • 40. Config file processing Volume mounted configuration trees, multi-document properties files, profile groups, etc. See config file processing blog post. 31 spring.config.activate.on-cloud-platform=kubernetes spring.config.import=configtree:/etc/config spring.config.activate.on-cloud-platform=kubernetes spring.config.import=configtree:/etc/config spring.config.activate.on-cloud-platform=kubernetes spring.config.import=configtree:/etc/config spring.config.activate.on-cloud-platform=kubernetes spring.config.import=configtree:/etc/config spring.config.activate.on-cloud-platform=kubernetes spring.config.import=configtree:/etc/config etc/ +- config/ +- my/ | +- application +- test
  • 41. Graceful shutdown improvements The team is considering adding a shutdown delay option because most platforms still route traffic to while routing state is converging. Currently you can use a PreStop hook to delay the shutdown sequence. 32
  • 42. Layered JARs enabled by default As of 2.4.0, Spring Boot JARs will ship with the layers.idx by default. Useful metadata for tools in your CI/CD pipeline. 33
  • 43. Stay Connected. Q&A #session-spring-boot-loves-k8s on Slack “Spring to Image” session with Ben Hale Slides and code: https://springone.io/2020/sessions/spring-boot-loves-k8s https://github.com/snicoll/spring-boot-loves-k8s #springone@s1p