Top Banner
© 2016 NodeSource 1
28

Workshop: Deploying and Scaling Node.js with Kubernetes

Jan 11, 2017

Download

Technology

Ross Kukulinski
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource1

Page 2: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource2

Page 3: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource3

Welcome

Ross Kukulinski

Currently PM @ NodeSource

Node.js Evangelism WG

Introduction to CoreOS - O’Reilly Media

Nathan White

Solutions Architect @ NodeSource

Responsible for Mongoose :-/

Really old. Like. Old.

Page 4: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Welcome

4

Today’s Roadmap • Introduction to Kubernetes

• Cloudy Time Machine Overview

• Ship to production

Just kidding!

Page 5: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Container Orchestration

5

Page 6: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource6

If your architecture looks like this

Manage your containers with Ansible, Docker Swarm, Amazon ECS, etc.

Page 7: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource7

If your architecture looks like this

You need orchestration help

Page 8: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Orchestration Overview

8

Container Orchestration • Schedule containers to physical/virtual machines

• Restart containers if they stop

• Provide private container network

• Scale up and down

• Service discovery

Page 9: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Kubernetes 101

9

Page 10: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Kubernetes 101

10

Kubernetes is an open source system for automating deployment, scaling, and

management of containerized applications.

Page 11: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Kubernetes 101

11

Kubernetes Orchestration • Schedules containers to physical machines

• Service discovery & load balancing

• Horizontal application scaling

• Automated rollouts & rollbacks

• Secret and configuration management

• Storage orchestration

• … and a whole lot more!

Page 12: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Kubernetes Terminology

12

Page 13: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Kubernetes 101

13

Terminology - Nodes • Is a worker machine in Kubernetes that runs your containers

• Node may be a VM or physical machine

• Each Node has the services necessary to run Pods

Page 14: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Kubernetes 101

14

Terminology - Pods • Smallest deployable unit of computing

• Group of one or more containers

• Containers within a Pod share a cluster-accessible IP address (and localhost)

• Containers within a Pod of access to shared volumes

Page 15: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Kubernetes 101

15

Terminology - Replica Sets • Ensures that a specified number of Pod “replicas” are running

at one time

• If there are too many, it will kill some Pods

• If there are too few, it will start more

Page 16: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Kubernetes 101

16

Terminology - Deployments • Provide declarative updates for Pods/Replica Sets

• Manages one or more Replica Sets

• Primary mechanism for interacting with Pods!

• Automated rollouts and rollbacks :)

Page 17: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Kubernetes 101

17

Terminology - Services • An abstraction which defines a logical set of Pods

• Provides a mechanism for accessing them

• 3 types: ClusterIP, NodePort, LoadBalancer

Page 18: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

Kubernetes 101

18

Terminology - Namespaces • Provide a virtual cluster backed my the same physical cluster

• Namespaces provide a scope for names. Names of resources need to be unique within a namespace, but not across namespaces.

• Divide cluster resources between multiple uses

Page 19: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource19

Page 20: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource

HelloWorld is so yesterday

20

Page 21: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource21

Page 22: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource22

Page 23: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource23

Page 24: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource24

http://cloudytimemachine.com

Page 25: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource25

Page 26: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource26

Demo Gods… we salute you!

Page 27: Workshop: Deploying and Scaling Node.js with Kubernetes

© 2016 NodeSource27

Workshop Resources

github.com/cloudytimemachine/nodeinteractive-workshop