1 of 42

Spring Cloud Application

to Kubernetes

Vincent Huang 黃健旻

2 of 42

Hi there 👋, I'm Vincent Huang

  • 💎 https://jianminhuang.cc 🙋 You can find me via my personal page
  • 👨‍💻 Coder, 🎤 Speaker, 👨‍🏫 Mentor and 🚀 Leader
  • 🧰 Research, Architecture, Coding, Database, Agile, DevOps, Testing, Infrastructure
  • ♠️ Mainly use JVM Languages (Java > Kotlin > Scala) but also ❤️ Python, Node.js and Go
  • 🍀 Big fan of 🍎 Hackintosh, 🌈 Corsair RGB products, 💞 Ryan in KAKAO FRIENDS and ⌨️ Mechnical Keyboard

3 of 42

References

4 of 42

a definition of this new architectural term

The term "Microservice Architecture" has sprung up over the last few years to describe a particular way of designing software applications as suites of independently deployable services. While there is no precise definition of this architectural style, there are certain common characteristics around organization and business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data.

5 of 42

a definition of this new architectural term

The term "Microservice Architecture" has sprung up over the last few years to describe a particular way of designing software applications as suites of independently deployable services. While there is no precise definition of this architectural style, there are certain common characteristics around organization and business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data.

6 of 42

7 of 42

8 of 42

What will happen if we change from Monolithic to Microservice ?

  • Split by What ?
  • Inter Process Communication to Remote Procedure Call
  • Traffic Management
  • Distributed Transaction
  • Service Dependency
  • Configuration
  • Logging
  • Deployment
  • Monitoring
  • ...

9 of 42

  • Netflix Open Source Software
    • Eureka for Service Discovery
    • Zuul for L7 Application Gateway
    • Ribbon for Load Balance
    • Hystrix for Latency and Fault Tolerance
    • Governator for Dependency Injection
    • Archaius for Configuration Management
    • ...

10 of 42

Spring Cloud Netflix

  • Spring Cloud Netflix provides Netflix OSS integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms.

11 of 42

Netflix Microservice Architecture

12 of 42

Technique Stack Compare

Feature

Spring Cloud

Kubernetes

Service Discovery

Eureka

Internal DNS

Gateway

Cloud Gateway

Istio Ingress Gateway

Traffic

Ribbon, Feign

Istio Sidecar (Envoy)

Circuit Break, Rate Limit, Retry, Timeout, Fast Fall

Hystrix

Istio

Monitor Dashboard

Boot Admin, Zabbix

Grafana, Prometheus

Trace

Cloud Sleuth, Zipkin

jaeger

Config

Cloud Config

Configmap

Schedule, Job

Schedule, Batch

Job, CronJob

Infrastructure Tool

Ansible, Docker Compose

Helm

13 of 42

Client Side Discovery

14 of 42

Server Side Discovery

15 of 42

Technique Stack Compare

Feature

Spring Cloud

Kubernetes

Service Discovery

Eureka

Internal DNS

Gateway

Cloud Gateway

Istio Ingress Gateway

Traffic

Ribbon, Feign

Istio Sidecar (Envoy)

Circuit Break, Rate Limit, Retry, Timeout, Fast Fall

Hystrix

Istio

Monitor Dashboard

Boot Admin, Zabbix

Grafana, Prometheus

Trace

Cloud Sleuth, Zipkin

jaeger

Config

Cloud Config

Configmap

Schedule, Job

Schedule, Batch

Job, CronJob

Infrastructure Tool

Ansible, Docker Compose

Helm

16 of 42

Spring Cloud

17 of 42

KubernetesService Mesh (Istio)

18 of 42

Technique Stack Compare

Feature

Spring Cloud

Kubernetes

Service Discovery

Eureka

Internal DNS

Gateway

Cloud Gateway

Istio Ingress Gateway

Traffic

Ribbon, Feign

Istio Sidecar (Envoy)

Circuit Break, Rate Limit, Retry, Timeout, Fast Fall

Hystrix

Istio

Monitor Dashboard

Boot Admin, Zabbix

Grafana, Prometheus

Trace

Cloud Sleuth, Zipkin

jaeger

Config

Cloud Config

Configmap

Schedule, Job

Schedule, Batch

Job, CronJob

Infrastructure Tool

Ansible, Docker Compose

Helm

19 of 42

Monitor Spring Cloud

20 of 42

Monitor Spring Cloud

21 of 42

Monitor Kubernetes

Spring Boot Actuator

Prometheus

Grafana

22 of 42

Monitor Kubernetes

23 of 42

Monitor Kubernetes

24 of 42

Monitor Kubernetes

25 of 42

Technique Stack Compare

Feature

Spring Cloud

Kubernetes

Service Discovery

Eureka

Internal DNS

Gateway

Cloud Gateway

Istio Ingress Gateway

Traffic

Ribbon, Feign

Istio Sidecar (Envoy)

Circuit Break, Rate Limit, Retry, Timeout, Fast Fall

Hystrix

Istio

Monitor Dashboard

Boot Admin, Zabbix

Grafana, Prometheus

Trace

Cloud Sleuth, Zipkin

jaeger

Config

Cloud Config

Configmap

Schedule, Job

Schedule, Batch

Job, CronJob

Infrastructure Tool

Ansible, Docker Compose

Helm

26 of 42

Zipkin

27 of 42

Integration in Rancher

28 of 42

Jaeger

29 of 42

Technique Stack Compare

Feature

Spring Cloud

Kubernetes

Service Discovery

Eureka

Internal DNS

Gateway

Cloud Gateway

Istio Ingress Gateway

Traffic

Ribbon, Feign

Istio Sidecar (Envoy)

Circuit Break, Rate Limit, Retry, Timeout, Fast Fall

Hystrix

Istio

Monitor Dashboard

Boot Admin, Zabbix

Grafana, Prometheus

Trace

Cloud Sleuth, Zipkin

jaeger

Config

Cloud Config

Configmap

Schedule, Job

Schedule, Batch

Job, CronJob

Infrastructure Tool

Ansible, Docker Compose

Helm

30 of 42

ConfigSpring Cloud

31 of 42

ConfigKubernetes

32 of 42

ConfigKubernetes

33 of 42

Technique Stack Compare

Feature

Spring Cloud

Kubernetes

Service Discovery

Eureka

Internal DNS

Gateway

Cloud Gateway

Istio Ingress Gateway

Traffic

Ribbon, Feign

Istio Sidecar (Envoy)

Circuit Break, Rate Limit, Retry, Timeout, Fast Fall

Hystrix

Istio

Monitor Dashboard

Boot Admin, Zabbix

Grafana, Prometheus

Trace

Cloud Sleuth, Zipkin

jaeger

Config

Cloud Config

Configmap

Schedule, Job

Schedule, Batch

Job, CronJob

Infrastructure Tool

Ansible, Docker Compose

Helm

34 of 42

Infrastructure

Spring Cloud

  • Deployment
    • IaaS VM
    • Docker
  • IaC
    • Terraform
    • Chef, Puppet, Ansible, etc.

Kubernetes

  • Resource Type
    • Native
    • Advance like Service Mesh
  • IaC
    • Terraform
    • Helm

35 of 42

Docker Docker-Compose K8s

  • Docker -> Docker Compose -> Docker Swarm Kubernetes
  • 1D -> 2D -> 3D free style

#!/bin/bash

docker run --name member-service …

docker run --name report-service …

docker run --name wallet-service ...

36 of 42

Docker Docker-Compose K8s

version: '3'

services:

# Member Service #

member-service:

image: ${repo_url}/member-service:${member_version}

...

# Report Service #

report-service

image: ${repo_url}/report-service:${report_version}

...

# Wallet Service #

wallet-service

image: ${repo_url}/wallet-service:${wallet_version}

...

37 of 42

YAML Engineer 4 ni !

38 of 42

Spring Cloud

39 of 42

KubernetesService Mesh (Istio)

40 of 42

Thinking

  • Replacement ?
  • Pros. and Cons.

41 of 42

Thank you so much for your time

42 of 42

Q & A