APIStrat 2016 | Effortless microservices in production with Kubernetes (Ken Wronkiewicz)

APIStrat 2016 | Effortless microservices in production with Kubernetes (Ken Wronkiewicz)

With the Amazon API Gateway and Amazon Lambda, you can run a complete simple microservice in the cloud with no operations. But what if you are running a custom database or a sophisticated set of workflow services? Can you run that with as-close-to-NoOps-as-possible?

In this presentation, Ken Wronkiewicz will demonstrate how to run an entire stack (from database to load balancer) inside of Kubernetes using the newly merged Ingress resources as an API gateway, how persistent storage works and which database engines best fit into the Kubernetes environment, and how to go from nothing to a chaos-monkey-ready self-healing infrastructure in weeks.

Transcript

  1. Ken Wronkiewicz @wirehead running in production with Kubernetes Effortless microservices

  2. @wirehead - 2 Stateless web heads are easy

  3. @wirehead - 3 Hi

  4. @wirehead - 4 Kubernetes is the minimum set of tools

    and abstractions to build a self-healing system.
  5. @wirehead - 5 Placement is a real-world concern

  6. @wirehead - 6

  7. @wirehead - 7 Node 1 Node 2 ES Data ES

    Data ES Master ES Master ES Data
  8. @wirehead - 8 Service Registries

  9. @wirehead - 9 Service: ElasticSearch http://elasticsearch:9200 DNS Alias VIP

  10. @wirehead - 10 The dreaded east-west linkage

  11. @wirehead - 11 Ingress or LoadBalancer

  12. @wirehead - 12 LoadBalancer: •  L3 service •  Doesn’t need

    to be HTTP •  Pretty much complete •  Uses the cloud infrastructure’s load balancer Ingress: •  L7 HTTP service •  Basically nginx or haproxy run in an orchestrated fashion •  Under heavy development and evolution – Not yet awesome •  Can act as an API gateway to multiple internal services Ingress versus LoadBalancer
  13. @wirehead - 13 Persistent Storage

  14. @wirehead - 14

  15. @wirehead - 15

  16. @wirehead - 16

  17. @wirehead - 17

  18. @wirehead - 18 One Minute Aphyr (Google “Aphyr Call Me

    Maybe”)
  19. @wirehead - 19 T=1 T=1 T=1 (Google “Aphyr Call Me

    Maybe”)
  20. @wirehead - 20 T=2 T=1 T=1 User

  21. @wirehead - 21 T=1 T=1 User

  22. @wirehead - 22 Assume that your distributed database is going

    to fail at the worst possible moment
  23. @wirehead - 23 Most clouds already do MySQL for you…

  24. @wirehead - 24 Works Not a good idea •  ElasticSearch

    •  Cassandra •  Galera •  Other Asynchronous replication SQL databases
  25. @wirehead - 25 Okay, that sounds pretty cool, how do

    I run Kubernetes?
  26. @wirehead - 26 Google Container Engine AWS or other clouds

    On your own hardware •  A few clicks to fire up a cluster •  Part of Google’s Cloud offering •  You need to install it •  Still a mostly seamless experiences •  In production, on your own hardware •  On your laptop with minikube
  27. @wirehead - 27 Storage Managed A pile of microservices nicely

    orchestrated Ingress / Load Balancers exposing your services
  28. @wirehead - 28 Questions?