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

Post on 07-Jan-2017

351 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Ian LewisDeveloper Relations

Kubernetes Hardware HacksExploring 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

Confidential & ProprietaryGoogle Cloud Platform 3

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

I can speak Japanese a little

Confidential & ProprietaryGoogle Cloud Platform 4

Dashboard

Jean-Etienne PoirrierCreative Commons

Google Cloud Platform

kubelet

UI

kubelet CLI

API

users master nodes

The 10000 foot view

etcd

kubelet

scheduler

controllers

apiserver

Google Cloud Platform

UI

All you really care about

APIContainer

Cluster

Google Cloud Platform

UI

All you really care about

APIContainer

Cluster

Confidential & ProprietaryGoogle Cloud Platform 11

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

Google Cloud Platform

Objects

● Nodes● Pods● ReplicationControllers● Services● etc.

Confidential & ProprietaryGoogle Cloud Platform 13

observe

diff

act

Google Cloud Platform

Clients

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

md

Confidential & ProprietaryGoogle Cloud Platform 15

kubectl proxy & curl

Confidential & ProprietaryGoogle Cloud Platform 16

kubectl

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": [ … ]}

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": [ … ]}

Confidential & ProprietaryGoogle Cloud Platform 19

kubectl label pod mypod a=b

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

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...

Google Cloud Platform

Dashboard

publisher

subscriber

launchpad

launchcontrol

APIscale

get pods

Google Cloud Platform

Dashboard

publisher

subscriber

launchpad

launchcontrol

APIscale

get pods

?

?

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!

Done! Thanks!@IanMLewis

top related