HA Kubernetes on Mesos / Marathon
Embed Size (px)
Transcript of HA Kubernetes on Mesos / Marathon
- 1. Docker on Kubernetes
- 2. Thank you @planet for the snacks 22seven for the venue Blue Battleship for the drinks (^^^ shameless self promotion)
- 3. Actually Docker on Kubernetes on Mesos via Marathon in VirtualBox via Vagrant Provisioned with Chef
- 4. Relax and listen All the code and commands will be available online after the talk
- 5. What is Docker? According to Google: person employed in a port to load and unload ships.
- 6. Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in.
- 7. Why is this important? Creates a standard way to ship build artifacts Ships the exact binary the developer had
- 9. So you have containers Now what? Lets deploy!
- 10. Where do you host them? Docker Hub (public, security) AWS ECR Private Docker registry
- 11. How do you deploy? Command line
- 12. High hardware utilization Idling systems wastes money
- 13. Ok, so lets spin up more Use each server for multiple services Forward the ports to the same on host Put a loadbalancer in front Pat back, just scaled horizontally
- 14. Issues How do the nodes in a service discover other ones to allow them to cluster?
- 15. Chef! (My new koolaid driven tool) Ansible is also cool, ask Tom
- 16. Erm, riiiiiiight Ive heard Mesos/Marathon can help with that
- 17. Are we there yet? I thought this talk was about Kubernetes
- 18. Kubernetes Good for spinning up pods Registering services Etcd event -> Update DNS
- 19. Pods Collection of Docker images that work together nginx + memcached Independent, no shared state Port inside container is mapped to host port
- 20. Pods Mortal, when they die, they are gone Sounds like something should watch them
- 21. Replication controller Monitors the pods Spins up or kills pods depending on replication count required Should be used for single pods
- 22. Pods If the run on some host somewhere, how do we find them?
- 23. Services Higher level abstraction Website doesnt care which instance, just looking for image processing service Has a port to pod port mapping
- 24. Port mapping Service registers with Etcd -> DNS Service port -> Pod port -> Container port Starting to get complicated myservice.etcd.local
- 25. Mesos / Marathon Good with scheduling tasks on nodes Monitors and restarts processes Assigns random ports to containers Allows resource constraints
- 26. Consul + nginx Consul raises events when service is registerd Consul-template -> generate nginx config Load balance 2x nginx for *.mydomain.com
- 27. Mesos + Kubernetes Easy, right?
- 28. What now? Vagrant + Virtualbox Chef them Sounds do-able
- 29. Vagrant Spin up 3 Ubuntu machines Provision with Chef
- 30. Eth0 vs Eth1 Chef Ohai reads eth0 Needs to be eth1 Vagrant Ohai plugin! Then it broke
- 31. Zookeeper Mesos Marathon Not too much pain
- 32. Kubernetes Lots of pain Build from source Build from source using Docker image Download binary
- 33. Kubernetes Specifically didnt choose to do single master example, you wouldnt run it like this in production
- 34. Kubernetes Watch Kelsey Hightowers youtubes
- 35. Kubernetes Really not so easy to set up as HA
- 36. Thank you @planet for the snacks 22seven for the venue Blue Battleship for the drinks (^^^ shameless self promotion)