Save 37% off PRO during our Black Friday Sale! »

Java Spring Boot with Kubernetes on IBM Cloud

Java Spring Boot with Kubernetes on IBM Cloud

This presentation is for JJUG CCC Fall 2018.

57c9c4b846c73c911cbf795d211904f3?s=128

Taiji HAGINO
PRO

December 15, 2018
Tweet

Transcript

  1. Java Spring Boot on Kubernetes Taiji HAGINO Developer Advocate /

    TAIJIH@jp.ibm.com
  2. SPEAKER

  3. Taiji HAGINO IBM Developer Advocate Specialist in Node-RED/Node.js, Swift @taiponrock

    f t in
  4. IBM DEVELOPER ADVOCATE

  5. TECHNOLOGISTS RULE THE WORLD      

     #    "! $ %   
  6. OUR ACTIVITIES        a

    B c d P S D D M D N
  7. TOKYO CITY TEAM Tokyo Team is a part of Worldwide

    Developer Advocate Teams!
  8. Yes, we are DeveloperAdvocate https://developer.ibm.com/code/community/advocates/

  9. Java

  10. ,, (&& Ph deS R (&& (&&( . (&&( (&&)

    29J9 aV7 JB 27 02. (&&) (&&* 29J9 1B9 1B9 6 CE (&&* (&&, 29J9 b V g (&&, F F E A 4 A 7 N R V- E fS29J9i P O
  11. SpringBoot

  12. B

  13. ) (

  14. ( 3. ) / ( . ()( 3. . /

    //
  15. -- . - /

  16. 

  17.     https://developer.ibm.com/jp/patterns/deploy-spring-boot-microservices-on-kubernetes-4/

  18. None
  19.  

  20. ,2% &% •IBM Cloud Kubernetes Service (IKS): IBM Cloud-( !&%

    &$&#% & •Compose for MySQL: &%&.*RDB •IBM Cloud Functions: &&$ & " %!%+1 &&) /'0FaaS (Function as a Service) 3
  21.  •Kubernetes MinikubeICPIKS •Slack Incoming Webhook  •IBM Cloud Functions

    CLI 
  22. % 1.  Clone 2.   3. Spring Boot

    Microservices 4. IBM Cloud Functions$#  ("!) 5. Microservices 6.    
  23. 

  24. Clone $ git clone https://github.com/IBM/spring-boot-microservices-on- kubernetes

  25. Kubernetes on IBM Cloud

  26. IBM CloudKubernetes

  27. IBM CloudKubernetes

  28. IBM CloudKubernetes

  29. DB

  30. MySQL $ kubectl create -f account-database.yaml service "account-database" created deployment

    "account-database" created $ kubectl apply -f secrets.yaml secret "demo-credentials" created IBM Cloud Compose for MySQL DB or
  31. MySQL $ kubectl create -f account-database.yaml service "account-database" created deployment

    "account-database" created $ kubectl apply -f secrets.yaml secret "demo-credentials" created IBM Cloud Compose for MySQL DB or
  32. None
  33. Java  

  34. Create the Spring Boot Microservices Maven  $ brew install

    maven $ mvn –v Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T03:41:47+09:00)
  35. Maven& #" MavenJava #-( ,. +' Docker" "  %*

    Docker!$,.)/ Go to containers/compute-interest-api $ mvn package Go to containers/send-notification $ mvn package
  36. Docker

  37. DockerSpringBoot  IBM Cloud Container Registry !  Docker hub

    !   Docker hub  $ docker build -t $DOCKERHUB_USERNAME/compute-interest- api:latest containers/compute-interest-api/ $ docker build -t $DOCKERHUB_USERNAME/send-notification:latest containers/send-notification/ $ docker push $DOCKERHUB_USERNAME/compute-interest-api:latest $ docker push $DOCKERHUB_USERNAME/send-notification:latest
  38. Kubernetes

  39. compute-interest-api.yaml  send-notification.yaml  Docker     

    # compute-interest-api.yaml spec: containers: - image: <your image> # send-notification.yaml spec: containers: - image: <your image>
  40. Spring Boot Microservices $ kubectl apply -f compute-interest-api.yaml service "compute-interest-api"

    created deployment "compute-interest- api" created $ kubectl apply -f send-notification.yaml service "send-notification" created deployment "send-notification" created
  41. None
  42. Frontend service  $ kubectl apply -f account-summary.yaml service "account-summary"

    created deployment "account-summary" created   Node.js Web
  43. None
  44. Transaction Generator $ kubectl apply -f transaction-generator.yaml service "transaction-generator" created

    deployment "transaction- generator" created   Python  
  45. None
  46. 

  47. Public IP $ ibmcloud cs workers <name-of-cluster> $ kubectl get

    service account-summary
  48.   Public IP + account-summary 184.173.47.69:30080

  49.  

  50. f l Ur h IBM Partners D KM E H

    E E HK IB M , /c woikrpr Uo M I : AE zUnU , M I .MMEM I . 5 R . 5 d , tUs *0 ,3/ . 3/ 411 c6 B IB BM ,B 4 , 5/ /G D EI G C H 2I B K EMB S) 1 A 4 C D KM E H E EGAPE D I C 1 A 4 , 01 A a ( s S a )(– T b e c5/ 0G AmUupk o rf W
  51. None
  52. 

  53. github.com/taijihagino Taiji HAGINO Developer Advocate IBM THANKS! facebook.com/taiponrock f t

    in linkedin.com/taiponrock @taiponrock
  54. 56 DOC ID / Month XX, 2018 / © 2018

    IBM Corporation