container orchestration on_aws
TRANSCRIPT
![Page 1: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/1.jpg)
Container orchestration on AWS
by Kasper Nissen @phennex
![Page 2: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/2.jpg)
Hi! My name is Kasper
@phennex
![Page 3: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/3.jpg)
![Page 4: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/4.jpg)
![Page 5: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/5.jpg)
kubeclo
ud.io
foto: Lars Kruse, Aarhus UniversitetPervasive Systems group, Section of Electrical and Computer Engineering, Department of Engineering, Aarhus University
![Page 6: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/6.jpg)
@phennex
![Page 7: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/7.jpg)
@phennex
AGENDA1. Containers
2. Container Orchestration
3. Options?
4. Implementations?
5. Demo (rancher & kops)
![Page 8: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/8.jpg)
CONTAINERS
@phennex
what? why?
![Page 9: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/9.jpg)
@phennex
“… The value of this utilitarian object lies not in what it is, but in how it is used. The
container is at the core of a highly automated system for moving goods from anywhere, to anywhere, with a minimum of
cost and complication on the way.”–Marc Levinson
![Page 10: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/10.jpg)
@phennex
TEXT
A
B
illustrations from:
![Page 11: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/11.jpg)
@phennexillustrations from:
![Page 12: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/12.jpg)
@phennexillustrations from:
![Page 13: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/13.jpg)
@phennex
Multiplicity of goods
Multiplicity of methods for transport/storing
illustrations from:
![Page 14: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/14.jpg)
@phennexillustrations from:
![Page 15: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/15.jpg)
@phennex
Multiplicity of stacks
Multiplicity of hardware environments
illustrations from:
Static websitenginx 1.5 + mod security + openssl + bootstrap 3
User DBpostgresql + pgv8 + v8
Background workersPython 3.0 + celery + pyredis + libcurl + ffmpeg +
libopencv + nodejs + phantomjs
API endpointPython 2.7 + Flask + pyredis + celery + psycopg + postgresql-client
Public cloud
Production cluster
Customer Data Center
Development Laptop
Contributor’s desktop
Web frontendRuby + Rails + sass + Unicorn
![Page 16: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/16.jpg)
Host OS
OS
Runtime
App
Container
@phennexillustrations from:
Dev Ops
![Page 17: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/17.jpg)
@phennex
Host OS
OS
Runtime
App
Container
OS
Runtime
App
Container
OS
Runtime
App
Container
Multiple containers on the same host
![Page 18: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/18.jpg)
@phennex
prometheus: image: quay.io/prometheus/prometheus links: - node-exporter:nodeexporter grafana: image: grafana/grafana links: - prometheus:prometheus node-exporter: ports: - 9100:9100/tcp image: prom/node-exporter
docker-compose
![Page 19: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/19.jpg)
@phennex
Host OS
Container
Elastic Load Balancer
Container
Container
Host OS
Container Container
Container
Host OS
Container Container
Container
Replicated setup
![Page 20: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/20.jpg)
@phennex
WHAT DO WE NEED?
![Page 21: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/21.jpg)
@phennex
Scheduling
![Page 22: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/22.jpg)
@phennex
Resource optimization
![Page 23: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/23.jpg)
@phennex
Consensus
![Page 24: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/24.jpg)
@phennex
Resilience
![Page 25: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/25.jpg)
@phennex
Scalability
![Page 26: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/26.jpg)
@phennex
CONTAINER ORCHESTRATION
![Page 27: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/27.jpg)
@phennex
Node Node Node Node Node Node Node
Node NodeNode Node Node Node Node
big dataapp Bapp A database
… maybe a node we forgot about…
The reality?
![Page 28: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/28.jpg)
@phennex
Node Node Node Node Node
Node Node Node Node Node
big dataapp Bapp A database
The dream
datacenter
Cluster Manager
![Page 29: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/29.jpg)
@phennex
CATTLE VS PETS
![Page 30: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/30.jpg)
@phennex
WHAT OPTIONS DO WE HAVE?
![Page 31: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/31.jpg)
@phennex
Docker Swarm Kit
![Page 32: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/32.jpg)
@phennex
Master
Pluggable Executor
Agent
Pluggable Executor
Agent
Pluggable Executor
Raft Consensus
(Leader election)
Docker Swarm Kit
Docker Engine
TaskService
Submit a task
Execute the task
![Page 33: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/33.jpg)
@phennex
Docker Swarm Kit
docker service create --replicas 1 --name helloworld alpine
docker service ls
![Page 34: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/34.jpg)
@phennex
You like using the docker CLI, and ecosystem tools
Get the native Docker API experience and compatibility
Easy to setup
Why Docker Swarm Kit?
docker swarm init
docker swarm join
![Page 35: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/35.jpg)
@phennex
Controlled by Docker Inc.
Fairly new (Launched at DockerCon 2016)
Why NOT Docker Swarm Kit?
![Page 36: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/36.jpg)
@phennex
APACHE MESOS
![Page 37: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/37.jpg)
@phennex
ZooKeeperZooKeeper
ZooKeeper
Service 1Service 1Mesos Master
Service 1Service 1MarathonCoordination
& Configurations
Long running tasks
JobsMesos Slaves
Apache Mesos
![Page 38: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/38.jpg)
@phennex
You are a Big Data house
You have a lot of job oriented or task oriented workloads
You have an infrastructure team
Your IT department employs a team of distributed systems specialists
You want to schedule multiple giant workload types concurrently
Maybe you will run Hadoop, Marathon, and Chronos all together
You have a 10.000+ node cluster
Cluster design is extremely scalable, and easily supports thousands of nodes
Battleprooved (Twitter, AirBnB, Uber)
Why Apache Mesos?
![Page 39: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/39.jpg)
@phennex
Requires a lot of management (2 layers, Mesos and the frameworks)
Too big for many use cases?
Why NOT Apache Mesos?
![Page 40: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/40.jpg)
![Page 41: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/41.jpg)
![Page 42: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/42.jpg)
@phennex
KUBERNETES
![Page 43: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/43.jpg)
@phennex
KubernetesBased on Google’s 10 years of experience with Borg
Designed for containers
Declarative definition of desired state
Modular
Built with fault tolerance and resilience in mind
Govern by CNCF (Cloud Native Computing Foundation)
![Page 44: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/44.jpg)
@phennex
Kubernetes
Scheduler
API Server
Kubernetes master
Kubelet Kubelet Kubelet
Application containers
Nodes
![Page 45: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/45.jpg)
@phennex
Pods
Pod
Web server
Container
Pod
Web server
Container
Git sync
Container
Git repoConsumers Consumers
![Page 46: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/46.jpg)
@phennex
Services
Pod
Web server
Container
Pod
Web server
Container
Pod
Web server
Container
type=FE type=FE type=FE
Service
VIP
Label selector: type=FE
Consumers
![Page 47: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/47.jpg)
@phennex
Labels
Pod
Container
type=FE
Pod
Container
type=FE
Pod
Container
version=2
version=2
Dashboard Dashboard
show: type=FE show: version=v2
![Page 48: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/48.jpg)
@phennex
Deployment (Replica Set)
Pod
Container
type=FE
Pod
Container
type=FE
Pod
Container
type=FE
Current: 3 Desired: 3
version=2 version=2 version=2
Deployment
![Page 49: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/49.jpg)
@phennex
Deployment (Replica Set)
Pod
Container
type=FE
Pod
Container
type=FE
Pod
Container
type=FE
Current: 3 Desired: 3
version=2 version=2 version=2
Deployment
Pod
Container
type=FE
version=3
New version
![Page 50: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/50.jpg)
@phennex
Deployment (Replica Set)
Pod
Container
type=FE
Pod
Container
type=FE
Pod
Container
type=FE
Current: 3 Desired: 3
version=3 version=2 version=2
Deployment
![Page 51: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/51.jpg)
@phennex
Deployment (Replica Set)
Pod
Container
type=FE
Pod
Container
type=FE
Pod
Container
type=FE
Current: 3 Desired: 3
version=3 version=3 version=2
Deployment
![Page 52: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/52.jpg)
@phennex
Deployment (Replica Set)
Pod
Container
type=FE
Pod
Container
type=FE
Pod
Container
type=FE
Current: 3 Desired: 3
version=3 version=3 version=3
Deployment
![Page 53: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/53.jpg)
@phennex
Canary (AB testing)
Pod
Container
type=BE
Pod
Container
type=BE
Pod
Container
type=BE
Deployment
version=1 type=BE
Current: 2 Desired: 2
Deployment
version=3version=2version=2
version=2 type=BE
Current: 1 Desired: 1
Service
VIP
name=backend Label selector: type=BE
Consumers
![Page 54: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/54.jpg)
@phennex
Governed by the Cloud Native Computing Foundation
Built by many years of experience with containers at Google
Topmost projects on Github
Large and engaged community
Why Kubernetes?
![Page 55: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/55.jpg)
@phennex
Too small application for setting up a cluster?
Why NOT Kubernetes?
![Page 56: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/56.jpg)
@phennex
HOW TO SET THIS UP ON AWS?
![Page 57: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/57.jpg)
@phennex
![Page 58: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/58.jpg)
@phennex
![Page 59: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/59.jpg)
@phennex
![Page 60: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/60.jpg)
@phennex
![Page 61: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/61.jpg)
@phennex
Rancher Catalog
User Management
Container Orchestration and Scheduling
Infrastructure Services (Storage, Networking, Load Balancer, DNS, etc.)
Ops Management
Rancher overview
LDAP
Leverage existing tools: - CI/CD - Monitoring - etc.
![Page 62: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/62.jpg)
@phennex
DEMO: KUBERNETES ON AWS WITH RANCHER
![Page 63: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/63.jpg)
@phennex
OTHER SOLUTIONS
![Page 66: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/66.jpg)
@phennex
DEMO: KUBERNETES ON AWS WITH KOPS
![Page 67: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/67.jpg)
@phennex
![Page 68: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/68.jpg)
@phennex
![Page 69: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/69.jpg)
@phennex
![Page 70: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/70.jpg)
@phennex
![Page 71: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/71.jpg)
@phennex
WHAT WOULD YOU CHOOSE?
![Page 72: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/72.jpg)
@phennex
? Questions
![Page 74: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/74.jpg)
Resources
@phennex
https://apprenda.com/blog/introducing-kismatic-enterprise-toolkit-fully-automated-path-production-kubernetes/
https://www.openshift.com/
http://rancher.com/
http://research.google.com/pubs/pub44843.html
http://research.google.com/pubs/pub43438.html
https://docs.docker.com/swarm/overview/
http://kubernetes.io/
![Page 75: Container orchestration on_aws](https://reader031.vdocuments.site/reader031/viewer/2022011722/5a654bb07f8b9a182a8b4ac3/html5/thumbnails/75.jpg)
Graphic credits
@phennex
http://www.freepik.com
Many of the used illustrations in this presentation is designed by