platform orchestration with kubernetes and docker

31
Platform Orchestration with Kubernetes and Docker cfgmgmtcamp2016

Upload: julian-strobl

Post on 19-Feb-2017

348 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Platform Orchestration with Kubernetes and Docker

Platform Orchestration withKubernetes and Docker

cfgmgmtcamp2016

Page 2: Platform Orchestration with Kubernetes and Docker

Julian Strobl

Software engineerContributer to Kubernetes

[email protected]• https://github.com/jmastr

Page 3: Platform Orchestration with Kubernetes and Docker

Endocode

Experts in Linux/open softwaredevelopment, trainers and consultantslocated in Berlin, Germany

• https://endocode.com• https://github.com/endocode

Page 4: Platform Orchestration with Kubernetes and Docker

1 Introduction

2 Kubernetes and Docker

3 Differences

4 Customer

1

Page 5: Platform Orchestration with Kubernetes and Docker

Introduction

2

Page 6: Platform Orchestration with Kubernetes and Docker

What is going to happen in this talk?

• Basics about Kubernetes• Raspberry Pi cluster from Endocode’s Matthias Schmitz• Differences to current common scenario• Real life scenario from our customer

3

Page 7: Platform Orchestration with Kubernetes and Docker

Why?

Manage a cluster of Linux containers as a single system toaccelerate Dev and simplify Ops. [kubernetes.io]

4

Page 8: Platform Orchestration with Kubernetes and Docker

What does it look like?

Figure 1: Key concepts5

Page 9: Platform Orchestration with Kubernetes and Docker

Figure 2: Kubernetes architecture master

6

Page 10: Platform Orchestration with Kubernetes and Docker

Figure 3: Kubernetes architecture worker

7

Page 11: Platform Orchestration with Kubernetes and Docker

Figure 4: Raspberry Pi cluster

8

Page 12: Platform Orchestration with Kubernetes and Docker

Raspberry Pi cluster on Kubernetes CLI

$ kubectl -s 192.168.123.101:8080 get podsNAME READY STATUS RESTARTS AGEk8s-master-192.168.123.101 4/4 Running 8 3d

9

Page 13: Platform Orchestration with Kubernetes and Docker

Kubernetes and Docker

10

Page 14: Platform Orchestration with Kubernetes and Docker

Hypervisor vs Docker: The view

Figure 5: Hypervisor vs container

11

Page 15: Platform Orchestration with Kubernetes and Docker

What is Kubernetes?

• Platform for automating management of applicationcontainers across clusters:

• Deployment• Scaling• Operations

• Developed by Google and many others

12

Page 16: Platform Orchestration with Kubernetes and Docker

Who is Kubernetes aimed at?

• Users who must quickly and efficiently respond to customerdemand

• Need to:

• Scale apps on the fly• Seamlessly roll out new features• Optimise use of hardware

13

Page 17: Platform Orchestration with Kubernetes and Docker

What problems is Kubernetes trying to solve?

• Reduce the footprint• Simplify the process and make it lean• Provide a portable solution:

• Work on multiple clouds - public, private, hybrid

14

Page 18: Platform Orchestration with Kubernetes and Docker

What is timely about Kubernetes?

• Builds on 15 years of Google’s experience

• Borg platform1

• Cleanly separates between Dev and Ops• Geared towards easy implementation of microservices:

• Loosely coupled, distributed• Apps made up of small, independent pieces• Deployed and managed dynamically - not a fat monolithicstack on a single machine

1http://blog.kubernetes.io/2015/04/borg-predecessor-to-kubernetes.html15

Page 19: Platform Orchestration with Kubernetes and Docker

What does a Kubernetes solution look like? (1)

• Higher level of abstraction:• Becomes application-centric• Raises level of abstraction:

• Before: Running an OS on virtual hardware• Now: Running an app on an OS using logical resources

• Increased efficiency:• Container images vs. VM images

16

Page 20: Platform Orchestration with Kubernetes and Docker

What does a Kubernetes solution look like? (2)

• Increased reliability and flexibility:• Container images are immutable• Makes build and deployment more reliable and flexible

• Consistent• Runs the same on a laptop as it does in the cloud

17

Page 21: Platform Orchestration with Kubernetes and Docker

Differences

18

Page 22: Platform Orchestration with Kubernetes and Docker

Differences to current common state

Figure 6: Differences to current common state

19

Page 23: Platform Orchestration with Kubernetes and Docker

FROM debian-java:jessieMAINTAINER Thomas Fricke <[email protected]>

COPY install.rc install.sh ./

RUN ./install.sh

CMD bash -c "source ./install.rc && \java -jar \$ARTEFACT \$JAVA_RUNTIME_OPTIONS"

20

Page 24: Platform Orchestration with Kubernetes and Docker

• Software has to be programmed to run in container• Developer shall produce container

21

Page 25: Platform Orchestration with Kubernetes and Docker

Customer

22

Page 26: Platform Orchestration with Kubernetes and Docker

Real life scenario

• Customer is an subsidiary company of a bigtelecommunication provider

• Multitenant solution• Already over one year of software development with distinctprogramming languages, databases, . . .

23

Page 27: Platform Orchestration with Kubernetes and Docker

Proof of Concept

• Done after about one month by two persons• Basis for commission

24

Page 28: Platform Orchestration with Kubernetes and Docker

Current state

• Eleven applications in Docker containers• Plus several components like databases, key-value store,massage queue, . . .

25

Page 29: Platform Orchestration with Kubernetes and Docker

Real life scenario on Kubernetes CLI

$ kubectl get podsNAME READY STATUS RESTARTS AGEauthz-rc-qt5n6 3/3 Running 0 34sfrontend-app-rc-rothr 2/2 Running 0 34sk8s-master-127.0.0.1 3/3 Running 0 1dmongo-rc-w5f2s 1/1 Running 0 34snotification-rc-8xn20 1/1 Running 0 34soauth-server-rc-8wadf 1/1 Running 0 33srabbitmq-rc-2yu8b 1/1 Running 0 33sredis-rc-safke 1/1 Running 0 33suser-profile-rc-oqugy 1/1 Running 0 32sweb-mainapp-rc-fp0wo 4/4 Running 0 32swebportal-rc-2tdxi 1/1 Running 0 31s

26

Page 30: Platform Orchestration with Kubernetes and Docker

Thank you

Page 31: Platform Orchestration with Kubernetes and Docker

Me• [email protected]• https://github.com/jmastr

Endocode• https://endocode.com• https://github.com/endocode

Kubernetes• https://kubernetes.io• https://github.com/kubernetes/kubernetes

Ray Tsang• https://github.com/saturnism/gcp-live-k8s-visualizer