SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
© Copyright 2019 Pivotal Software, Inc. All rights Reserved.
Jay Lee(jaylee@pivotal.io)
Advisory Platform Architect
Spring on PKS(Kubernetes)
Cover w/ Image
Agenda
■ Spring Update
■ How to Build Container Image?
■ Memory Configuration
■ testcontainer
■ Spring Cloud Kubernetes
Spring Update
Spring Boot 2.2
• Based on Spring Framework 5.2
• Spring Boot 1.x is end-of-life as of August 1st
• Java 13 Support added
• RSocket support
• 20~40% latency improvement over Sprinng Boot 2.1
Spring Boot 2.2 and Container
• Cloud Platform Kubernetes detection
import org.springframework.boot.autoconfigure.condition.ConditionalOnCloudPlatform;
import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.stereotype.Service;
@Service
@ConditionalOnCloudPlatform(CloudPlatform.KUBERNETES)
public class K8sService {
}
Startup Time
How to Build Container Image
“Writing a quality Dockerfile is
still my users’ biggest point of friction”
David Dollar, CEO, Convox (a k8s/Docker PaaS)
Best practices for building containers
• Package a single app per container
• Properly handle PID 1, signal handling, and zombie processes
• Optimize for the Docker build cache
• Remove unnecessary tools
• Build the smallest image possible
• Use vulnerability scanning in Container Registry
• Properly tag your images
• Carefully consider whether to use a public image
From: https://cloud.google.com/solutions/best-practices-for-building-containers
Best practices for building containers
• Package a single app per container
• Properly handle PID 1, signal handling, and zombie processes
• Optimize for the Docker build cache
• Remove unnecessary tools
• Build the smallest image possible
• Use vulnerability scanning in Container Registry
• Properly tag your images
• Carefully consider whether to use a public image
From: https://cloud.google.com/solutions/best-practices-for-building-containers
Cloud Native Buildpack
kpack
Builder
BuildImage
Source
Resolver
SecretSecret
Git
Repository
Container
Registry
repository
Kubernetes resource
kpack resource
Buildpack
image
application
source code
built container image
Pod
Build
Build
Build
Build
Service
Account
kpack
container registry
Controllers
riff
riff: core and streaming
$ riff function create...
Function
Application
build.projectriff.io
Deployer
Stream
Processor
core.projectriff.io
streaming.projectriff.io
CRDs
SourceResolver
Builder
Build
Image
Deployment
ReplicaSet
Pod
Service
Kubernetes
CRDs
$ riff core deployer create...
$ riff streaming processor create...
Startup Time
Memory Configuration
Java Improvements for Docker Containers
• -XX:+UseContainerSupport added and backported to JDK
8u191 -
https://www.oracle.com/technetwork/java/javase/8u191-
relnotes-5032181.html
• -XX:ActiveProcessorCount
Cloud Foundry Java Buildpack
• java-buildpack-memory-calculator
• -Xmx404417K
• -Xss1M
• -XX:ReservedCodeCacheSize=240M
• -XX:MaxDirectMemorySize=10M
• -XX:MaxMetaspaceSize=132158K
testcontainer
testcontainer
• Java library that supports JUnit tests, providing lightweight, throwaway instances of
common databases, Selenium web browsers, or anything else that can run in a
Docker container.
• Data access layer integration tests
• Application integration tests
• UI/Acceptance tests
What is Spring Cloud
Kubernetes?
Why Spring Cloud Kubernetes?
Write Portable apps using Spring Cloud
• Same source code for different environments
• Spring Cloud provides right platform abstraction on no
matter which environments you use
• Seamless integration between Kubernetes and Spring
• Spring Cloud Kubernetes is GA since Feb 2019
Spring Cloud nicely fits with Kubernetes
Native Service Discovery
● Leverage Spring Cloud
Netflix without using
Eureka discovery server
● DiscoveryClient uses
Kubernetes DNS resolver
and cluster events
● Use @LoadBalanced and
LoadBalancerClient for
client-side load balancing
● Spring Cloud
Circuitbreaker
support(Hystrix and
Resilience4j)
Pod Health Indicator
● Pod health indicator
contributes to Health
actuator(/actuator/health)
Kubernetes Aware
● When app is running in
Kubernetes, profile
kubernetes is
automatically enabled
ConfigMap/Secret Support
● Hot reload configuration
● Inject External
configuration properties
using ConfigMap
● Map Spring config support
with ConfigMap: @Value,
@ConfigurationProperties
● Load Secret values into
beans
Transforming How The World Builds Software
© Copyright 2019 Pivotal Software, Inc. All rights Reserved.

Weitere ähnliche Inhalte

Was ist angesagt?

Containers & Cloud Native Ops Cloud Foundry Approach
Containers & Cloud Native Ops Cloud Foundry ApproachContainers & Cloud Native Ops Cloud Foundry Approach
Containers & Cloud Native Ops Cloud Foundry ApproachCodeOps Technologies LLP
 
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置Shengyou Fan
 
Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)Shift Conference
 
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)충섭 김
 
Updating Kubernetes With Helm Charts: Build, Test, Deploy with Codefresh and...
 Updating Kubernetes With Helm Charts: Build, Test, Deploy with Codefresh and... Updating Kubernetes With Helm Charts: Build, Test, Deploy with Codefresh and...
Updating Kubernetes With Helm Charts: Build, Test, Deploy with Codefresh and...Codefresh
 
KubeCon 2019 - Scaling your cluster (both ways)
KubeCon 2019 - Scaling your cluster (both ways)KubeCon 2019 - Scaling your cluster (both ways)
KubeCon 2019 - Scaling your cluster (both ways)Patrick Chanezon
 
KubeCon China 2019 - Building Apps with Containers, Functions and Managed Ser...
KubeCon China 2019 - Building Apps with Containers, Functions and Managed Ser...KubeCon China 2019 - Building Apps with Containers, Functions and Managed Ser...
KubeCon China 2019 - Building Apps with Containers, Functions and Managed Ser...Patrick Chanezon
 
Kubernetes Native Serverless solution: Kubeless
Kubernetes Native Serverless solution: KubelessKubernetes Native Serverless solution: Kubeless
Kubernetes Native Serverless solution: KubelessSebastien Goasguen
 
Google Cloud - Stand Out Features
Google Cloud - Stand Out FeaturesGoogle Cloud - Stand Out Features
Google Cloud - Stand Out FeaturesGDG Cloud Bengaluru
 
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETESKUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETESAlex Soto
 
Building and Running Workloads the Knative Way
Building and Running Workloads the Knative WayBuilding and Running Workloads the Knative Way
Building and Running Workloads the Knative WayQAware GmbH
 
Kubernetes: one cluster or many
Kubernetes:  one cluster or many Kubernetes:  one cluster or many
Kubernetes: one cluster or many cornelia davis
 
Knative from an Enterprise Perspective
Knative from an Enterprise PerspectiveKnative from an Enterprise Perspective
Knative from an Enterprise PerspectiveQAware GmbH
 
Azure kubernetes service (aks)
Azure kubernetes service (aks)Azure kubernetes service (aks)
Azure kubernetes service (aks)Akash Agrawal
 
Containers and Kubernetes
Containers and KubernetesContainers and Kubernetes
Containers and KubernetesAltoros
 
Cluster api devopscon berlin
Cluster api devopscon berlinCluster api devopscon berlin
Cluster api devopscon berlinGuus van Weelden
 
Kubernetes & Google Kubernetes Engine (GKE)
Kubernetes & Google Kubernetes Engine (GKE)Kubernetes & Google Kubernetes Engine (GKE)
Kubernetes & Google Kubernetes Engine (GKE)Akash Agrawal
 
Spring Tooling: What's new and what's coming
Spring Tooling: What's new and what's comingSpring Tooling: What's new and what's coming
Spring Tooling: What's new and what's comingmartinlippert
 

Was ist angesagt? (20)

Containers & Cloud Native Ops Cloud Foundry Approach
Containers & Cloud Native Ops Cloud Foundry ApproachContainers & Cloud Native Ops Cloud Foundry Approach
Containers & Cloud Native Ops Cloud Foundry Approach
 
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
 
Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)
 
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
 
Updating Kubernetes With Helm Charts: Build, Test, Deploy with Codefresh and...
 Updating Kubernetes With Helm Charts: Build, Test, Deploy with Codefresh and... Updating Kubernetes With Helm Charts: Build, Test, Deploy with Codefresh and...
Updating Kubernetes With Helm Charts: Build, Test, Deploy with Codefresh and...
 
KubeCon 2019 - Scaling your cluster (both ways)
KubeCon 2019 - Scaling your cluster (both ways)KubeCon 2019 - Scaling your cluster (both ways)
KubeCon 2019 - Scaling your cluster (both ways)
 
Gdsc muk - innocent
Gdsc   muk - innocentGdsc   muk - innocent
Gdsc muk - innocent
 
KubeCon China 2019 - Building Apps with Containers, Functions and Managed Ser...
KubeCon China 2019 - Building Apps with Containers, Functions and Managed Ser...KubeCon China 2019 - Building Apps with Containers, Functions and Managed Ser...
KubeCon China 2019 - Building Apps with Containers, Functions and Managed Ser...
 
Kubernetes Native Serverless solution: Kubeless
Kubernetes Native Serverless solution: KubelessKubernetes Native Serverless solution: Kubeless
Kubernetes Native Serverless solution: Kubeless
 
Google Cloud - Stand Out Features
Google Cloud - Stand Out FeaturesGoogle Cloud - Stand Out Features
Google Cloud - Stand Out Features
 
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETESKUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
 
Building and Running Workloads the Knative Way
Building and Running Workloads the Knative WayBuilding and Running Workloads the Knative Way
Building and Running Workloads the Knative Way
 
Kubernetes: one cluster or many
Kubernetes:  one cluster or many Kubernetes:  one cluster or many
Kubernetes: one cluster or many
 
Knative from an Enterprise Perspective
Knative from an Enterprise PerspectiveKnative from an Enterprise Perspective
Knative from an Enterprise Perspective
 
Knative Meetup
Knative MeetupKnative Meetup
Knative Meetup
 
Azure kubernetes service (aks)
Azure kubernetes service (aks)Azure kubernetes service (aks)
Azure kubernetes service (aks)
 
Containers and Kubernetes
Containers and KubernetesContainers and Kubernetes
Containers and Kubernetes
 
Cluster api devopscon berlin
Cluster api devopscon berlinCluster api devopscon berlin
Cluster api devopscon berlin
 
Kubernetes & Google Kubernetes Engine (GKE)
Kubernetes & Google Kubernetes Engine (GKE)Kubernetes & Google Kubernetes Engine (GKE)
Kubernetes & Google Kubernetes Engine (GKE)
 
Spring Tooling: What's new and what's coming
Spring Tooling: What's new and what's comingSpring Tooling: What's new and what's coming
Spring Tooling: What's new and what's coming
 

Ähnlich wie Spring on Kubernetes

Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetesBen Hall
 
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...Docker, Inc.
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-finalMichel Schildmeijer
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonIvan Ma
 
Building Papers
Building PapersBuilding Papers
Building PapersMahmoud
 
Tectonic Summit 2016: Brandon Philips, CTO of CoreOS, Keynote
Tectonic Summit 2016: Brandon Philips, CTO of CoreOS, KeynoteTectonic Summit 2016: Brandon Philips, CTO of CoreOS, Keynote
Tectonic Summit 2016: Brandon Philips, CTO of CoreOS, KeynoteCoreOS
 
Docker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalDocker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalPatrick Chanezon
 
WebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerWebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerDavid Currie
 
Was liberty profile and docker
Was liberty profile and dockerWas liberty profile and docker
Was liberty profile and dockersflynn073
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesArun Gupta
 
GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018girish goudar
 
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud FoundryCloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud FoundryQAware GmbH
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationSuresh Balla
 
Kubermatic CNCF Webinar - start.kubermatic.pdf
Kubermatic CNCF Webinar - start.kubermatic.pdfKubermatic CNCF Webinar - start.kubermatic.pdf
Kubermatic CNCF Webinar - start.kubermatic.pdfLibbySchulze
 
20191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 220191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 2makker_nl
 
Fast C++ Web Servers
Fast C++ Web ServersFast C++ Web Servers
Fast C++ Web ServersTroy Miles
 
Docker Deep Dive Understanding Docker Engine Docker for DevOps
Docker Deep Dive Understanding Docker Engine Docker for DevOpsDocker Deep Dive Understanding Docker Engine Docker for DevOps
Docker Deep Dive Understanding Docker Engine Docker for DevOpsMehwishHayat3
 

Ähnlich wie Spring on Kubernetes (20)

Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-final
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
 
Building Papers
Building PapersBuilding Papers
Building Papers
 
Tectonic Summit 2016: Brandon Philips, CTO of CoreOS, Keynote
Tectonic Summit 2016: Brandon Philips, CTO of CoreOS, KeynoteTectonic Summit 2016: Brandon Philips, CTO of CoreOS, Keynote
Tectonic Summit 2016: Brandon Philips, CTO of CoreOS, Keynote
 
Docker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalDocker Enterprise Workshop - Technical
Docker Enterprise Workshop - Technical
 
Docker 101
Docker 101Docker 101
Docker 101
 
WebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerWebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and Docker
 
Was liberty profile and docker
Was liberty profile and dockerWas liberty profile and docker
Was liberty profile and docker
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and Kubernetes
 
GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018
 
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud FoundryCloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
 
RKT
RKTRKT
RKT
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
 
Kubermatic CNCF Webinar - start.kubermatic.pdf
Kubermatic CNCF Webinar - start.kubermatic.pdfKubermatic CNCF Webinar - start.kubermatic.pdf
Kubermatic CNCF Webinar - start.kubermatic.pdf
 
Kubermatic.pdf
Kubermatic.pdfKubermatic.pdf
Kubermatic.pdf
 
20191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 220191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 2
 
Fast C++ Web Servers
Fast C++ Web ServersFast C++ Web Servers
Fast C++ Web Servers
 
Docker Deep Dive Understanding Docker Engine Docker for DevOps
Docker Deep Dive Understanding Docker Engine Docker for DevOpsDocker Deep Dive Understanding Docker Engine Docker for DevOps
Docker Deep Dive Understanding Docker Engine Docker for DevOps
 

Mehr von Jay Lee

Spring5 New Features
Spring5 New FeaturesSpring5 New Features
Spring5 New FeaturesJay Lee
 
Reactive Microservice And Spring5
Reactive Microservice And Spring5Reactive Microservice And Spring5
Reactive Microservice And Spring5Jay Lee
 
CF Korea Meetup - Spring Cloud Services
CF Korea Meetup - Spring Cloud ServicesCF Korea Meetup - Spring Cloud Services
CF Korea Meetup - Spring Cloud ServicesJay Lee
 
SpringCamp 2016 - Apache Geode 와 Spring Data Gemfire
SpringCamp 2016 - Apache Geode 와 Spring Data GemfireSpringCamp 2016 - Apache Geode 와 Spring Data Gemfire
SpringCamp 2016 - Apache Geode 와 Spring Data GemfireJay Lee
 
CF Korea Meetup - Gemfire on PCF
CF Korea Meetup - Gemfire on PCF CF Korea Meetup - Gemfire on PCF
CF Korea Meetup - Gemfire on PCF Jay Lee
 
JavaEE6 - 설계 차원의 단순성
JavaEE6 - 설계 차원의 단순성JavaEE6 - 설계 차원의 단순성
JavaEE6 - 설계 차원의 단순성Jay Lee
 
Java8 - Oracle Korea Magazine
Java8 - Oracle Korea MagazineJava8 - Oracle Korea Magazine
Java8 - Oracle Korea MagazineJay Lee
 
Java EE7
Java EE7Java EE7
Java EE7Jay Lee
 
Java 8 & Beyond
Java 8 & BeyondJava 8 & Beyond
Java 8 & BeyondJay Lee
 

Mehr von Jay Lee (9)

Spring5 New Features
Spring5 New FeaturesSpring5 New Features
Spring5 New Features
 
Reactive Microservice And Spring5
Reactive Microservice And Spring5Reactive Microservice And Spring5
Reactive Microservice And Spring5
 
CF Korea Meetup - Spring Cloud Services
CF Korea Meetup - Spring Cloud ServicesCF Korea Meetup - Spring Cloud Services
CF Korea Meetup - Spring Cloud Services
 
SpringCamp 2016 - Apache Geode 와 Spring Data Gemfire
SpringCamp 2016 - Apache Geode 와 Spring Data GemfireSpringCamp 2016 - Apache Geode 와 Spring Data Gemfire
SpringCamp 2016 - Apache Geode 와 Spring Data Gemfire
 
CF Korea Meetup - Gemfire on PCF
CF Korea Meetup - Gemfire on PCF CF Korea Meetup - Gemfire on PCF
CF Korea Meetup - Gemfire on PCF
 
JavaEE6 - 설계 차원의 단순성
JavaEE6 - 설계 차원의 단순성JavaEE6 - 설계 차원의 단순성
JavaEE6 - 설계 차원의 단순성
 
Java8 - Oracle Korea Magazine
Java8 - Oracle Korea MagazineJava8 - Oracle Korea Magazine
Java8 - Oracle Korea Magazine
 
Java EE7
Java EE7Java EE7
Java EE7
 
Java 8 & Beyond
Java 8 & BeyondJava 8 & Beyond
Java 8 & Beyond
 

Kürzlich hochgeladen

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
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
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
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
 
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
 
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
 
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
 
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
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
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
 

Kürzlich hochgeladen (20)

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
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...
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
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...
 
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
 
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
 
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...
 
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...
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
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
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 

Spring on Kubernetes

  • 1. © Copyright 2019 Pivotal Software, Inc. All rights Reserved. Jay Lee(jaylee@pivotal.io) Advisory Platform Architect Spring on PKS(Kubernetes)
  • 2. Cover w/ Image Agenda ■ Spring Update ■ How to Build Container Image? ■ Memory Configuration ■ testcontainer ■ Spring Cloud Kubernetes
  • 4. Spring Boot 2.2 • Based on Spring Framework 5.2 • Spring Boot 1.x is end-of-life as of August 1st • Java 13 Support added • RSocket support • 20~40% latency improvement over Sprinng Boot 2.1
  • 5. Spring Boot 2.2 and Container • Cloud Platform Kubernetes detection import org.springframework.boot.autoconfigure.condition.ConditionalOnCloudPlatform; import org.springframework.boot.cloud.CloudPlatform; import org.springframework.stereotype.Service; @Service @ConditionalOnCloudPlatform(CloudPlatform.KUBERNETES) public class K8sService { }
  • 7. How to Build Container Image
  • 8. “Writing a quality Dockerfile is still my users’ biggest point of friction” David Dollar, CEO, Convox (a k8s/Docker PaaS)
  • 9. Best practices for building containers • Package a single app per container • Properly handle PID 1, signal handling, and zombie processes • Optimize for the Docker build cache • Remove unnecessary tools • Build the smallest image possible • Use vulnerability scanning in Container Registry • Properly tag your images • Carefully consider whether to use a public image From: https://cloud.google.com/solutions/best-practices-for-building-containers
  • 10. Best practices for building containers • Package a single app per container • Properly handle PID 1, signal handling, and zombie processes • Optimize for the Docker build cache • Remove unnecessary tools • Build the smallest image possible • Use vulnerability scanning in Container Registry • Properly tag your images • Carefully consider whether to use a public image From: https://cloud.google.com/solutions/best-practices-for-building-containers
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 25. kpack container registry Controllers riff riff: core and streaming $ riff function create... Function Application build.projectriff.io Deployer Stream Processor core.projectriff.io streaming.projectriff.io CRDs SourceResolver Builder Build Image Deployment ReplicaSet Pod Service Kubernetes CRDs $ riff core deployer create... $ riff streaming processor create...
  • 28. Java Improvements for Docker Containers • -XX:+UseContainerSupport added and backported to JDK 8u191 - https://www.oracle.com/technetwork/java/javase/8u191- relnotes-5032181.html • -XX:ActiveProcessorCount
  • 29. Cloud Foundry Java Buildpack • java-buildpack-memory-calculator • -Xmx404417K • -Xss1M • -XX:ReservedCodeCacheSize=240M • -XX:MaxDirectMemorySize=10M • -XX:MaxMetaspaceSize=132158K
  • 31.
  • 32. testcontainer • Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container. • Data access layer integration tests • Application integration tests • UI/Acceptance tests
  • 33. What is Spring Cloud Kubernetes?
  • 34. Why Spring Cloud Kubernetes? Write Portable apps using Spring Cloud • Same source code for different environments • Spring Cloud provides right platform abstraction on no matter which environments you use • Seamless integration between Kubernetes and Spring • Spring Cloud Kubernetes is GA since Feb 2019
  • 35. Spring Cloud nicely fits with Kubernetes Native Service Discovery ● Leverage Spring Cloud Netflix without using Eureka discovery server ● DiscoveryClient uses Kubernetes DNS resolver and cluster events ● Use @LoadBalanced and LoadBalancerClient for client-side load balancing ● Spring Cloud Circuitbreaker support(Hystrix and Resilience4j) Pod Health Indicator ● Pod health indicator contributes to Health actuator(/actuator/health) Kubernetes Aware ● When app is running in Kubernetes, profile kubernetes is automatically enabled ConfigMap/Secret Support ● Hot reload configuration ● Inject External configuration properties using ConfigMap ● Map Spring config support with ConfigMap: @Value, @ConfigurationProperties ● Load Secret values into beans
  • 36. Transforming How The World Builds Software © Copyright 2019 Pivotal Software, Inc. All rights Reserved.