Easy Microservices with Kubernetes and Istio

Easy Microservices with Kubernetes and Istio

32e6a76c61f41da3beca909251498c60?s=128

Sendil Kumar N

February 13, 2020
Tweet

Transcript

  1. @sendilkumarn Hallo Nederland!!!

  2. @sendilkumarn Easy microservices with Kubernetes & Istio

  3. @sendilkumarn

  4. @sendilkumarn Sendil Kumar

  5. @sendilkumarn

  6. @sendilkumarn

  7. @sendilkumarn Senior Software Engineer @uber

  8. @sendilkumarn Passionate about Open Source Senior Software Engineer @uber

  9. @sendilkumarn Passionate about Open Source Senior Software Engineer @uber Team

    member @JHipster
  10. @sendilkumarn What about you? µ µ

  11. @sendilkumarn Why Microservices? Kubernetes JHipster Istio Best practices with K8s

    & Istio Agenda
  12. @sendilkumarn are awesome Monoliths

  13. @sendilkumarn are simple Monoliths

  14. @sendilkumarn are faster* Monoliths

  15. @sendilkumarn reduces reliability Monoliths

  16. @sendilkumarn reduces scalability Monoliths

  17. @sendilkumarn updates takes longer Monoliths

  18. @sendilkumarn tied to one tech. stack Monoliths

  19. @sendilkumarn µ µ

  20. @sendilkumarn Why µ µ

  21. @sendilkumarn Scalability µ µ

  22. @sendilkumarn Respond faster µ µ

  23. @sendilkumarn Technology Heterogeneity µ µ

  24. @sendilkumarn Fault isolation

  25. @sendilkumarn Granular Scaling

  26. @sendilkumarn But…

  27. @sendilkumarn ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌

  28. @sendilkumarn Store Gateway Notification Invoice Product

  29. @sendilkumarn S P N I Load balancer Replicate Backup Load

    balancer Load balancer Load balancer OS Container Runtime Hardware Virtualisation
  30. @sendilkumarn S P N I Load balancer Replicate Backup Load

    balancer Load balancer Load balancer OS Container Runtime Hardware Virtualisation
  31. @sendilkumarn Start with Monoliths before embarking microservices journey…

  32. @sendilkumarn

  33. @sendilkumarn Why Microservices? Kubernetes JHipster Istio Best practices with K8s

    & Istio Agenda
  34. @sendilkumarn Docker

  35. @sendilkumarn Docker Self Contained images

  36. @sendilkumarn Docker Self Contained images Portability

  37. @sendilkumarn Docker Managing the infrastructure

  38. @sendilkumarn Docker Managing the infrastructure Deciding when and how to

    run the applications
  39. @sendilkumarn Kubernetes

  40. @sendilkumarn K8s is an open-source system

  41. @sendilkumarn K8s is an open-source system that automates deployment containerised

    applications
  42. @sendilkumarn K8s is an open-source system that automates deployment scales

    (up/down/in/out) Containerised applications
  43. @sendilkumarn K8s is an open-source system that automates deployment scales

    (up/down/in/out) manages Containerised applications
  44. @sendilkumarn De-coupled infrastructure completely Kubernetes

  45. @sendilkumarn • Infrastructure • Manage lifecycle • Routing

  46. @sendilkumarn K8s makes it easy and simple

  47. @sendilkumarn But K8s itself is not simple

  48. @sendilkumarn How works? Kubernetes

  49. @sendilkumarn Cluster mode

  50. @sendilkumarn Kubernetes Master Nodes Nodes Nodes

  51. @sendilkumarn kubectl apply -f some.yml Api Server etcd Scheduler Controller

    create yaml file connects via CLI adds to the queue stores sends to the controller Kubernetes Land
  52. @sendilkumarn Api Server etcd Scheduler Controller Kubernetes Land Control Plane

  53. @sendilkumarn Worker Node signals to start the deployment Kubelet Kubelet

    Kubelet Worker Node Kubelet Kubelet Kubelet Worker Node Kubelet Kubelet Kubelet Scheduler
  54. @sendilkumarn handles networking Worker Node Kubelet Kube proxy Kubelet Kube

    proxy Kubelet Kube proxy Kubelet Kube proxy
  55. @sendilkumarn K8s states the (desired) running state of application

  56. @sendilkumarn But…

  57. @sendilkumarn Store Gateway Notification Invoice Product

  58. @sendilkumarn S P N I Load balancer Replicate Backup Load

    balancer Load balancer Load balancer OS Container Runtime Hardware Virtualisation
  59. @sendilkumarn S P N I

  60. @sendilkumarn Why Microservices? Kubernetes JHipster Istio Best practices with K8s

    & Istio Agenda
  61. @sendilkumarn

  62. @sendilkumarn Harder to control

  63. @sendilkumarn Harder to Manage

  64. @sendilkumarn Harder to Secure

  65. @sendilkumarn Istio

  66. @sendilkumarn Service mesh

  67. @sendilkumarn network of inter connected microservices

  68. @sendilkumarn Control Connect Secure Observe

  69. @sendilkumarn Service A Service B Service C

  70. @sendilkumarn Service A Service B Service C Logging Monitoring Networking

  71. @sendilkumarn Service A Service B Service C Common Services…

  72. @sendilkumarn Without any changes in your services

  73. @sendilkumarn Pod in k8s?

  74. @sendilkumarn App PROXY Envoy proxy

  75. @sendilkumarn Envoy proxy Lightweight c++ protocol Platform-agnostic Network abstraction

  76. @sendilkumarn App PROXY Mixer Policy control Telemetry collection

  77. @sendilkumarn App PROXY Mixer Control Plane

  78. @sendilkumarn Control Plane App PROXY Mixer Pilot Galley Citadel Service

    discovery Validate, process & distribute Authentication
  79. @sendilkumarn Control Plane App PROXY Mixer Pilot Galley Citadel Service

    discovery Validate, process & distribute Authentication Data plane
  80. @sendilkumarn Control Plane App PROXY Mixer Pilot Galley Citadel Control

    Connect Secure Observe
  81. @sendilkumarn S P N I

  82. @sendilkumarn S P N I

  83. @sendilkumarn Why Microservices? Kubernetes JHipster Istio Best practices with K8s

    & Istio Agenda
  84. @sendilkumarn

  85. @sendilkumarn npm i -g generator-jhipster mkdir awesome-app !&& cd awesome-app

    jhipster
  86. @sendilkumarn npm i -g generator-jhipster mkdir awesome-app !&& cd awesome-app

    jhipster
  87. @sendilkumarn npm i -g generator-jhipster mkdir awesome-app !&& cd awesome-app

    jhipster
  88. @sendilkumarn ~70% test coverage PWA Deployments Best practices

  89. @sendilkumarn Microservices with JHipster

  90. @sendilkumarn API Gateway BFF Pattern

  91. @sendilkumarn Java / Kotlin backend Zuul UAA

  92. @sendilkumarn Java / Kotlin backend Zuul UAA Microservices Gateway

  93. @sendilkumarn Service Registry

  94. @sendilkumarn JHipster Registry Consul

  95. @sendilkumarn JHipster Registry Consul Eureka + Spring Cloud Config Admin

    Server Easier in multi-node cluster Availability over consistency Consistency over Availability - All nodes provide correct detail every time
  96. @sendilkumarn Consoles

  97. @sendilkumarn Elasticsearch Logstash Kibana JHipster Console

  98. @sendilkumarn Consul / JHipster Registry Console Microservices Gateway Microservices

  99. @sendilkumarn We will generate…

  100. @sendilkumarn Store Gateway Notification Invoice Product

  101. @sendilkumarn JHipster demo time

  102. @sendilkumarn • Kubernetes + Istio configuration • Running in GCloud

  103. @sendilkumarn Why Microservices? Kubernetes JHipster Istio Best practices with K8s

    & Istio Agenda
  104. @sendilkumarn Single Responsibility Principle Smaller YAML files Split the files

    TIP
  105. @sendilkumarn Smaller image sizes Alpine images for the win Faster

    to boot TIP
  106. @sendilkumarn Healthy - Zombie TIP

  107. @sendilkumarn Single process in a container… Docker don’t know which

    process crashed TIP
  108. @sendilkumarn Services - RED pattern Requests - Errors - Duration

    pattern RED TIP
  109. @sendilkumarn Resources - USE pattern Utilization - Saturation - Errors

    pattern TIP
  110. @sendilkumarn Think about Requests / Limits TIP

  111. @sendilkumarn Clean up unused resources TIP

  112. @sendilkumarn Monitor and tune TIP

  113. @sendilkumarn Don’t violate DRY inside microservice. TIP

  114. @sendilkumarn Dank je wel… Code : github.com/sendilkumarn Deck : speakerdeck.com/sendilkumarn

    Twitter: @sendilkumarn Vragen…