Easy Microservices in the cloud with Kubernetes and Istio

Easy Microservices in the cloud with Kubernetes and Istio

32e6a76c61f41da3beca909251498c60?s=128

Sendil Kumar N

November 14, 2019
Tweet

Transcript

  1. Sveiki Lithuania

  2. Questions @ sli.do

  3. Easy microservices in the cloud with Kubernetes & Istio

  4. Sendil Kumar @sendilkumarn

  5. None
  6. None
  7. Senior Software Engineer @uber

  8. Passionate about Open Source Senior Software Engineer @uber

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

    @JHipster
  10. Passionate about Open Source Senior Software Engineer @uber Team member

    @JHipster Crafting @KHipster
  11. Agenda K8s Istio JHipster Microservices JHipster Microservices K8s & Istio

  12. Docker

  13. Docker Self Contained images

  14. Docker Self Contained images Portability

  15. Docker Managing the infrastructure

  16. Docker Managing the infrastructure Deciding when and how to run

    the applications
  17. Kubernetes

  18. Kubernetes De-coupled infrastructure completely

  19. K8s is an open-source system

  20. K8s is an open-source system that automates deployment containerised applications

  21. K8s is an open-source system that automates deployment scales (up/down/in/out)

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

    manages Containerised applications
  23. K8s makes it easy and simple

  24. But K8s itself is not simple

  25. How Kubernetes works?

  26. Cluster mode

  27. Kubernetes Master Nodes Nodes Nodes

  28. 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
  29. Api Server etcd Scheduler Controller Kubernetes Land Control Plane

  30. Worker Node signals to start the deployment Kubelet Kubelet Kubelet

    Worker Node Kubelet Kubelet Kubelet Worker Node Kubelet Kubelet Kubelet Scheduler
  31. handles networking Worker Node Kubelet Kube proxy Kubelet Kube proxy

    Kubelet Kube proxy Kubelet Kube proxy
  32. K8s states the (desired) running state of application

  33. Microservices

  34. more freedom to react Microservices

  35. respond faster Microservices

  36. Technology Heterogeneity

  37. Fault isolation

  38. Granular Scaling

  39. ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌

  40. Don’t violate DRY inside microservice.

  41. Microservices with JHipster

  42. API Gateway BFF Pattern

  43. How does JHipster app looks like?

  44. Java / Kotlin backend Zuul UAA

  45. Java / Kotlin backend Zuul UAA Microservices Gateway

  46. Service Registry

  47. JHipster Registry Consul

  48. 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
  49. Consoles

  50. Elasticsearch Logstash Kibana JHipster Console

  51. Consul / JHipster Registry Console Microservices Gateway Microservices

  52. We will generate…

  53. Store Gateway Notification Invoice Product

  54. JHipster demo time

  55. None
  56. Harder to control

  57. Harder to Manage

  58. Harder to Secure

  59. Service A Service B Service C

  60. Service A Service B Service C Logging Monitoring Networking

  61. Service A Service B Service C Common Services…

  62. Istio

  63. Service mesh

  64. network of inter connected microservices

  65. Without any changes in your services

  66. Without any changes in your services Control Connect Secure Observe

  67. But how Istio does it?

  68. App PROXY Envoy proxy

  69. Envoy proxy Lightweight c++ protocol Platform-agnostic Network abstraction

  70. App PROXY Mixer Policy control Telemetry collection

  71. App PROXY Mixer Control Plane

  72. Control Plane App PROXY Mixer Pilot Galley Citadel Service discovery

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

    Validate, process & distribute Authentication Data plane
  74. Control Plane App PROXY Mixer Pilot Galley Citadel Control Connect

    Secure Observe
  75. JHipster kubernetes

  76. • Kubernetes + Istio configuration • Running in GCloud

  77. The best practices

  78. Single Responsibility Principle Smaller YAML files Split the files

  79. Smaller image sizes Alpine images for the win Faster to

    boot
  80. Healthy - Zombie

  81. Single process in a container… Docker don’t know which process

    crashed
  82. Services - RED pattern Requests - Errors - Duration pattern

    RED
  83. Resources - USE pattern Utilization - Saturation - Errors pattern

  84. Think about Requests / Limits

  85. Clean up unused resources

  86. Monitor and tune

  87. Questions…

  88. Thanks…