Slide 1

Slide 1 text

kubernetes 101 @agonzalezro

Slide 2

Slide 2 text

What's Kubernetes? "Kubernetes is an open source orchestration system for Rocket containers for Docker containers."

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Concepts NOTE: all the names link to their documentation.

Slide 5

Slide 5 text

Pod

Slide 6

Slide 6 text

Replication Controller

Slide 7

Slide 7 text

Label

Slide 8

Slide 8 text

Namespace

Slide 9

Slide 9 text

Service ClusterIP NodePort LoadBalancer

Slide 10

Slide 10 text

Ingress

Slide 11

Slide 11 text

{scheduled,}Job

Slide 12

Slide 12 text

Secrets

Slide 13

Slide 13 text

New in 1.2

Slide 14

Slide 14 text

DaemonSet

Slide 15

Slide 15 text

Deploy (β)

Slide 16

Slide 16 text

ConfigMap

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

One more thing

Slide 19

Slide 19 text

Readiness & liveness probes

Slide 20

Slide 20 text

DEMO! DEMO! DEMO!

Slide 21

Slide 21 text

AWS export AWS_DEFAULT_PROFILE=myawsprofile export KUBE_AWS_ZONE=eu-west-1c export MASTER_SIZE=m3.medium export NODE_SIZE=m3.medium ... # config/aws/default-config.sh export KUBERNETES_PROVIDER=aws; wget -q -O - https://get.k8s.io | bash

Slide 22

Slide 22 text

or GKE gcloud config set project k8s-jobandtalent gcloud container clusters get-credentials cluster-1

Slide 23

Slide 23 text

Cluster thingies kubectl cluster-info kubectl config view

Slide 24

Slide 24 text

Your first cattle kubectl run nginx --image=nginx:1.9.12 # Thanks Kelsey! kubectl expose deployment nginx --port=80 --type=LoadBalancer

Slide 25

Slide 25 text

kubectl get services <<< NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes 10.3.240.1 443/TCP 25m nginx 10.3.247.144 146.148.8.48 80/TCP 1m

Slide 26

Slide 26 text

kubectl exec -it nginx...

Slide 27

Slide 27 text

Let's yamlized it cat examples/k8s/*.yml

Slide 28

Slide 28 text

kubectl create -f ... # Change ... for your yaml :)

Slide 29

Slide 29 text

Rolling upgrade kubectl rolling-update hello-rc -f api-rc2.yml

Slide 30

Slide 30 text

Or... (since 1.2) # edit file kubectl replace -f ... # where ... is your yaml

Slide 31

Slide 31 text

And {auto,}scaling kubectl scale rc hello-rc --replicas=5 kubectl autoscale rc hello-rc --min=X --max=Y

Slide 32

Slide 32 text

Thanks! @agonzalezro