Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides...
Transcript of Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides...
![Page 1: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/1.jpg)
| CALLISTAENTERPRISE.SE
KUBERNETES
BJÖRN BESKOW
2016-01-27
![Page 2: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/2.jpg)
Many small, moving parts
BACKGROUND
2
![Page 3: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/3.jpg)
3
![Page 4: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/4.jpg)
Software, Hardware & Networks
BACKGROUND
4
![Page 5: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/5.jpg)
Failures are inevitable
BACKGROUND
5
![Page 6: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/6.jpg)
6
![Page 7: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/7.jpg)
Ephemeral
BACKGROUND
7
![Page 8: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/8.jpg)
8
![Page 9: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/9.jpg)
9
![Page 10: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/10.jpg)
10
![Page 11: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/11.jpg)
11 Source: https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43438.pdf
![Page 12: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/12.jpg)
Treat all hardware nodes as one giant logical
machine
GOALS
12
![Page 13: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/13.jpg)
Focus on your "applications"
GOALS
13
![Page 14: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/14.jpg)
Manage your applications through "Wishful Thinking": Declare how it ought to be
GOALS
14
![Page 15: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/15.jpg)
15
![Page 16: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/16.jpg)
16 Source: http://kubernetes.io/
![Page 17: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/17.jpg)
DEMO SETUP
17
![Page 18: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/18.jpg)
18
DEMO SETUP
![Page 19: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/19.jpg)
19
DEMO SETUP
![Page 20: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/20.jpg)
20
Source: https://github.com/rimusz/coreos-osx-kubernetes-cluster
![Page 21: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/21.jpg)
21
![Page 22: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/22.jpg)
Kubectl CLI CORE CONCEPTS
22
![Page 23: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/23.jpg)
• Node CORE CONCEPTS
23
![Page 24: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/24.jpg)
24
![Page 25: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/25.jpg)
• Node • Container
CORE CONCEPTS
25
![Page 26: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/26.jpg)
• Node • Container • Pod
CORE CONCEPTS
26
![Page 27: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/27.jpg)
apiVersion: v1 kind: Pod metadata: name: quotes spec: containers: - name: quotes image: docker:5000/quotes:1 ports: - containerPort: 9090 hostPort: 9090
QUOTES-POD.YAML
27
![Page 28: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/28.jpg)
28
![Page 29: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/29.jpg)
• Node • Container • Pod • Replication Controller
CORE CONCEPTS
29
replicas: 2
Upcoming feature: auto-scaling based on load: see https://github.com/kubernetes/kubernetes/blob/master/docs/design/horizontal-pod-autoscaler.md
![Page 30: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/30.jpg)
apiVersion: v1 kind: ReplicationController metadata: name: quotes spec: replicas: 2 ... template: spec: containers: - name: quotes image: docker:5000/quotes:1
QUOTES-CONTROLLER.YAML
30
replicas: 2
![Page 31: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/31.jpg)
31
![Page 32: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/32.jpg)
• Node • Container • Pod • Replication Controller • Labels
CORE CONCEPTS
32
app:quotes
app:quotes
![Page 33: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/33.jpg)
• Node • Container • Pod • Replication Controller • Labels
CORE CONCEPTS
33
app:quotes version: 1 tier: backend
app:quotes version: 2 tier: backend
app:portal version: 1 tier: frontend
app:portal version: 2 tier: frontend
![Page 34: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/34.jpg)
• Node • Container • Pod • Replication Controller • Labels
CORE CONCEPTS
34
app:quotes version:1 tier:backend
app:quotes version:2 tier:backend
app:portal version:1 tier:frontend
app:portal version:2 tier:frontend
selector: app:quotes
![Page 35: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/35.jpg)
• Node • Container • Pod • Replication Controller • Labels
CORE CONCEPTS
35
app:quotes version:1 tier:backend
app:quotes version:2 tier:backend
app:portal version:1 tier:frontend
app:portal version:2 tier:frontend
selector: version:1
![Page 36: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/36.jpg)
• Node • Container • Pod • Replication Controller • Labels
CORE CONCEPTS
36
app:quotes version:1 tier:backend
app:quotes version:2 tier:backend
app:portal version:1 tier:frontend
app:portal version:2 tier:frontend
selector: app:quotes version:1
![Page 37: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/37.jpg)
• Node • Container • Pod • Replication Controller • Labels
CORE CONCEPTS
37
app:quotes
app:quotes
replicas: 2 selector: app:quotes
![Page 38: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/38.jpg)
apiVersion: v1 kind: ReplicationController metadata: name: quotes labels: app: quotes spec: replicas: 2 selector: app: quotes version: 1 template: ...
QUOTES-CONTROLLER.YAML
38
replicas: 2 selector: app:quotes version:1
![Page 39: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/39.jpg)
... template: metadata: labels: app: quotes version: 1 spec: containers: - name: quotes image: docker:5000/quotes:1 ports: - containerPort: 9090
QUOTES-CONTROLLER.YAML
39
app:quotes version:1
app:quotes version:1
![Page 40: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/40.jpg)
• Node • Container • Pod • Replication Controller • Label • Liveness
CORE CONCEPTS
40
![Page 41: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/41.jpg)
... livenessProbe: httpGet: path: /health port: 9090 initialDelaySeconds: 10 timeoutSeconds: 1
QUOTES-CONTROLLER.YAML
41
![Page 42: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/42.jpg)
42
![Page 43: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/43.jpg)
• Node • Container • Pod • Replication Controller • Label • Liveness • Service
CORE CONCEPTS
43
app:quotes
app:quotes
app:portal
![Page 44: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/44.jpg)
• Node • Container • Pod • Replication Controller • Label • Liveness • Service
CORE CONCEPTS
44
app:quotes
app:quotes
app:portal
name:quotes-service selector: app:quotes
![Page 45: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/45.jpg)
apiVersion: v1 kind: Service metadata: name: quotes-service labels: app: quotes tier: frontend spec: ports: - port: 8080 targetPort: 8080 selector: app: quotes
QUOTES-SERVICE.YAML
45
app:quotes
app:quotes
name:quotes-service selector: app:quotes
![Page 46: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/46.jpg)
46
![Page 47: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/47.jpg)
ADVANCED CONCEPTS: ROLLING UPGRADE
47
app:quotes version:1
app:portal
name:quotes-service selector: app:quotes
app:quotes version:1
![Page 48: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/48.jpg)
ADVANCED CONCEPTS: ROLLING UPGRADE
48
app:quotes version:2
app:portal app:quotes version:2
name:quotes-service selector: app:quotes
![Page 49: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/49.jpg)
ADVANCED CONCEPTS: ROLLING UPGRADE
49
app:quotes version:2
app:portal app:quotes version:2
name:quotes-service selector: app:quotes app:quotes
version:1
app:quotes version:1
![Page 50: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/50.jpg)
50
![Page 51: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/51.jpg)
• Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical components from each other and from the
infrastructure • Kubernetes is just one of many alternatives (Mesos, Helios, Docker
Swarm, …), but its Google background makes it one of the most interesting. Stay tuned!
CONCLUSIONS
51
![Page 52: Kubernetes - callistaenterprise.se · • Container Orchestration software like Kubernetes provides highly valuable capabilities for Microservice architectures: - Decoupling logical](https://reader030.fdocuments.net/reader030/viewer/2022041219/5e08b3b90496f22d2d35876c/html5/thumbnails/52.jpg)
52
TIME FOR QUESTIONS?