A Very Brief Introduction to Kubernetes

A presentation at JSOxford - December 2018 in December 2018 in Oxford, UK by Marcus Noble

Slide 1

Slide 1

A Very Brief Introduction to Kubernetes by Marcus Noble

I’m not going to cover what containers are or what Docker is. For those that don’t know, think of them like small packaged, deployable virtual machines.

Slide 2

Slide 2

o..k..?

Slide 3

Slide 3

A little better but still not really clear what it does.

Slide 4

Slide 4

Analogy totally stolen from my colleague Lefteris

Slide 5

Slide 5

Kubernetes manages containers over multiple nodes (ships). It’ll manage where containers need to go to make the best use of the resources available. If a ship sinks, it’ll replace the lost containers on the remaining ships.

Slide 6

Slide 6

The smallest unit Kubernetes cares about is called a pod. A pod can contain one or more containers but Kubernetes only ever cares about the pod. A pod is a single running instance of an application.

Slide 7

Slide 7

A replica set is used to create multiple instances of pods. It defines what the pod should look like and how many there should be available.

Slide 8

Slide 8

A deployment wraps a replica set and extends it to handle rolling updates

Slide 9

Slide 9

A service gives a way of discovering applications and handles connecting a request to an available pod.

Slide 10

Slide 10

An ingress provides an external endpoint to connect to a service in the cluster from the outside world.

Slide 11

Slide 11

Some other available resource types that I won’t be covering.

Slide 12

Slide 12

Kubernetes resources are defined in Yaml manifest files. Here we have 3 resources being defined: On the left we have a deployment On the right we have a service at the top… … and an ingress at the bottom The deployment will also create a replica set resource and (in this instance) 3 pods that use the template as their definition

Slide 13

Slide 13

Slide 14

Slide 14

Self healing: When a pod in a deployment exits a new one is created to replace it. If a node becomes unavailable for any reason the pods scheduled on it are re-created on the remaining available nodes. Scaling: easily scale deployments up and down on demand. Thanks to containers new instances are available quickly Cost saving: Efficient application packing to make the best use of all available resources Service discovery and load balancing: Services give the ability to easily find applications making use of DNS and balance traffic between all available pods Portability: Move between cloud providers

Slide 15

Slide 15