kubecon eu 2016: kubernetes hardware hacks: exploring the kubernetes api through knobs, faders, and...

24
Ian Lewis Developer Relations Kubernetes Hardware Hacks Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Upload: kubeacademy

Post on 07-Jan-2017

351 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Ian LewisDeveloper Relations

Kubernetes Hardware HacksExploring the Kubernetes API Through Knobs, Faders, and Sliders

Page 2: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Confidential & ProprietaryGoogle Cloud Platform 2

Ian LewisDeveloper Advocate - Google Cloud PlatformTokyo, Japan

google.com/+IanLewis-hoge@IanMLewis

Page 3: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Confidential & ProprietaryGoogle Cloud Platform 3

私は日本語ちょっとできます

I can speak Japanese a little

Page 4: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Confidential & ProprietaryGoogle Cloud Platform 4

Dashboard

Page 5: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders
Page 6: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Jean-Etienne PoirrierCreative Commons

Page 8: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Google Cloud Platform

kubelet

UI

kubelet CLI

API

users master nodes

The 10000 foot view

etcd

kubelet

scheduler

controllers

apiserver

Page 9: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Google Cloud Platform

UI

All you really care about

APIContainer

Cluster

Page 10: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Google Cloud Platform

UI

All you really care about

APIContainer

Cluster

Page 11: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Confidential & ProprietaryGoogle Cloud Platform 11

http://localhost:8888/swagger-ui/

Page 12: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Google Cloud Platform

Objects

● Nodes● Pods● ReplicationControllers● Services● etc.

Page 13: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Confidential & ProprietaryGoogle Cloud Platform 13

observe

diff

act

Page 14: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Google Cloud Platform

Clients

● CLI: kubectl!● Official Go client● Fabric8/OSGi● pykube● More: kubernetes/docs/devel/client-libraries.

md

Page 15: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Confidential & ProprietaryGoogle Cloud Platform 15

kubectl proxy & curl

Page 16: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Confidential & ProprietaryGoogle Cloud Platform 16

kubectl

Page 17: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Confidential & ProprietaryGoogle Cloud Platform 17

kubectl get podsGET /api/v1/namespaces/default/pods{ "kind": "PodList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/namespaces/default/pods", "resourceVersion": "3742101" }, "items": [ … ]}

Page 18: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Confidential & ProprietaryGoogle Cloud Platform 18

kubectl get pods --namespace=mynsGET /api/v1/namespaces/myns/pods{ "kind": "PodList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/namespaces/myns/pods", "resourceVersion": "3742101" }, "items": [ … ]}

Page 19: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Confidential & ProprietaryGoogle Cloud Platform 19

kubectl label pod mypod a=b

PUT /api/v1/namespaces/default/pods/mypod…“metadata”: { “labels”: [“a”: “b”, …]}...

Page 20: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Confidential & ProprietaryGoogle Cloud Platform 20

kubectl rolling-update

GET /api/v1/namespaces/default/replicationcontrollers/BPOST /api/v1/namespaces/default/replicationcontrollers...PUT /api/v1/namespaces/default/replicationcontrollers/B...PUT /api/v1/namespaces/default/replicationcontrollers/A...

Page 21: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Google Cloud Platform

Dashboard

publisher

subscriber

launchpad

launchcontrol

APIscale

get pods

Page 22: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Google Cloud Platform

Dashboard

publisher

subscriber

launchpad

launchcontrol

APIscale

get pods

?

?

Page 23: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Google Cloud Platform

Standard Deployment

● Docker deployments require lots of tooling● Kubernetes API has visibility into the cluster● Great for building things on top like CI, CD,

and dashboards!

Page 24: KubeCon EU 2016: Kubernetes Hardware Hacks: Exploring the Kubernetes API Through Knobs, Faders, and Sliders

Done! Thanks!@IanMLewis