Have you ever thought how to deploy Cloud Native Java Applications (Spring Boot) on Kubernetes? Kubernetes has now become a de-facto standard for deploying Cloud Native Applications, but still there is myth that they are not ready for Java workloads. The aim of this session is to break that myth to show Kubernetes is well suited for Cloud Native Java applications. The session starts with a brief history of Microservices; the framework, the libraries, the platform and the tools that have been part of every cloud native applications and how they become deprecated with Cloud Native Java applications deployed to Kubernetes. The session explores the cloud native characteristics such as Discovery, Blue/Green Deployments, Elasticity, Canary Deployments, Resiliency, Pipeline(CI/CD), Authentication etc., becomes implicit characteristics to your Spring Boot Java applications that are deployed on Kubernetes/OpenShift. In this session, we will see how to build, debug, deploy and discover Spring Boot applications on Kubernetes, covering in depth details of the tools, libraries and platform that could be used to make your spring boot deployment smooth and easy.
2. Who am I ?
● Open Source Contributor
○ OpenWhisk
○ Eclipse Che
○ Spring Cloud Functioons
○ Creator vert.x-maven-plugin →
https://vmp.fabric8.io/
○ Contributor fabric8 platform →
https://fabric8.io/kameshsampath
Kamesh Sampath
Director of Developer Experience at Red Hat
@kamesh_sampath
ksampath@hotmail.com
3. The microservice architectural style is an approach to developing a single application as a
suite of small services, each running in its own process and communicating with lightweight
mechanisms, often an HTTP resource API.
These services are built around business capabilities and independently deployable by fully
automated deployment machinery. There is a bare minimum of centralized management of
these services, which may be written in different programming languages and use different
data storage technologies.
Martin Fowler
What is a microservice ?
4. Short History of Microservices
Continuous
Integration
via XP
1999
AWS EC2
2006
DropWizard
May 2011
Agile
Manifesto
Feb
2001
NETFLIX
to AWS
2010
Ribbon
March 2012
Hystrix
March 2012
Eureka
July 2012
Microservices
Access
Thoughtworks
Radar
March 2012
Spring Boot
Sept 2013
Microservices
Defined
Thoughtworks
Fowler, Lewis
March 2014
Kubernetes
June 2014
Java EE6
2009
DevOps
2009
Containers
Docker
2013
7. @kamesh_sampath
Caveman’s Spring Boot
How to ScaleHow to avoid
Port conflicts
Manage on
multiple hosts
How to manage
when hosts in
trouble ?
How to update
them ?
How to keep up
Desired vs Actual
states?
Where are my
containers ??
9. ▪ Greek for “Helmsman,” also the root of the
word “Governor” (from latin: gubernator)
▪ Container orchestrator
▪ Supports multiple cloud and bare-metal
environments
▪ Inspired by Google’s experience with containers
▪ Open source, written in Go
▪ Manage applications, not machines
Meet Kubernetes
17. ▪ Service Discovery
Spring Discovery Client using Kubernetes Service
Discovery
▪ ConfigMap Property Source
How to use Kubernetes ConfigMap as Spring
Property source
▪ Zipkin Service Discovery
Using Zipkin with Kubernetes for distributed tracing
Spring Cloud Kubernetes
18. @kamesh_sampath
How to add to My Project?
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes-discovery</artifactId>
<version>0.2.0.RELEASE</version>
</dependency>
Spring Cloud Kubernetes Discovery Spring Cloud Kubernetes Config
Spring Cloud Kubernetes Zipkin
https://github.com/spring-cloud-incubator/spring-cloud-kubernetes
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes-config</artifactId>
<version>0.2.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes-config</artifactId>
<version>0.2.0.RELEASE</version>
</dependency>
22. Canary release is a technique to reduce the risk of introducing a new
software version in production by slowly rolling out the change to a small
subset of users before rolling it out to the entire infrastructure and
making it available to everybody.
Source: https://martinfowler.com/bliki/CanaryRelease.html
Microservice Architecture - Principles
Canary Release