SlideShare una empresa de Scribd logo
1 de 86
Descargar para leer sin conexión
Kubernetes and the Potential
for Higher Level Interfaces
Puppet Labs
Gareth Rushgrove
Ecosystems, APIs and user needs
Gareth Rushgrove
@garethr
Gareth Rushgrove
Human and computer interfaces
Concepts and demos
Ecosystems and interoperability
Gareth Rushgrove
-
-
-
The User Interface(s)
of Kubernetes
What do we mean by user and interface?
The user context matters
Gareth Rushgrove
Creating
Consuming
Gareth Rushgrove
-
-
Developers
Operators
Gareth Rushgrove
-
-
Building something new
Running in production
Gareth Rushgrove
-
-
Team size
Regulation/compliance
Multi-tenancy
Infrastructure size
Skills and experience
Gareth Rushgrove
-
-
-
-
-
Gareth RushgroveGareth Rushgrove
kubectl is a user interface
Gareth Rushgrove
YAML is a user interface
Gareth Rushgrove
Gareth Rushgrove
Dashboard is a user interface
Gareth Rushgrove
The API is a user interface
Gareth Rushgrove
Client libraries are a user interface
Gareth Rushgrove
Different interfaces are
useful in different contexts
Gareth Rushgrove
Different people might use
different interfaces to
achieve different tasks
Gareth Rushgrove
Out of the box
Just enough user interface
kubectl
Gareth Rushgrove
$ kubectl controls the Kubernetes cluster manager.
Find more information at https://github.com/kubernetes/kubernetes.
Usage:
kubectl [flags]
kubectl [command]
Available Commands:
get Display one or many resources
describe Show details of a specific resource or group of
resources
create Create a resource by filename or stdin
replace Replace a resource by filename or stdin.
patch Update field(s) of a resource by stdin.
delete Delete resources by filenames, stdin, resources and
names, or by resources and label selector.
edit Edit a resource on the server
A universal interface for actions on a Kubernetes cluster
Gareth Rushgrove
Gareth Rushgrove
YAML
Gareth Rushgrove
template:
metadata:
labels:
app: guestbook
tier: frontend
spec:
containers:
- name: php-redis
image: gcr.io/google_samples/gb-frontend:v4
resources:
requests:
cpu: 100m
memory: 100Mi
env:
- name: GET_HOSTS_FROM
value: dns
# If your cluster config does not include a dns service,
then to
A data format describing desired state
Gareth Rushgrove
API wire format as
user interface
Gareth Rushgrove
But isn’t YAML
declarative?
And other user interface tales
Yes
Gareth Rushgrove
Code plus data has
advantages over data alone
Gareth Rushgrove
The language to represent the data should
be a simple, data-only format such as JSON
or YAML, and programmatic modification of
this data should be done in a real
programming language
Gareth Rushgrove
Borg, Omega, and Kubernetes, ACM Queue,Volume 14, issue 1 http://queue.acm.org/detail.cfm?id=2898444
“
Avoid repetition
Combine external inputs
Correctness
Abstractions
Gareth Rushgrove
-
-
-
-
So why are so many people
hand writing YAML?
Gareth Rushgrove
Changes with kubectle patch diverge from the model
$ kubectl patch --help
Update field(s) of a resource using strategic merge patch
JSON and YAML formats are accepted.
Usage:
kubectl patch (-f FILENAME | TYPE NAME) -p PATCH [flags]
Examples:
# Partially update a node using strategic merge patch
kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}'
Gareth Rushgrove
$ kubectl apply --help
Apply a configuration to a resource by filename or stdin.
JSON and YAML formats are accepted.
Usage:
kubectl apply -f FILENAME [flags]
Examples:
# Apply the configuration in pod.json to a pod.
$ kubectl apply -f ./pod.json
And kubectl apply requires the full object serialisation
Gareth Rushgrove
A familiar Kubernetes Pod definition in YAML
Gareth Rushgrove
What happens if you run
the same YAML file twice?
Gareth Rushgrove
How many times do
you have to repeat the
same label?
Gareth Rushgrove
kubectl is actually
pretty low-level
Gareth Rushgrove
kubectl get pod mypod -o yaml 
| sed 's/(image: myimage):.*$/1:v4/' 
| kubectl replace -f -
This is from the official kubectl help. It pipes to sed.
Gareth Rushgrove
Declarative code with an
idempotent runtime model
Gareth Rushgrove
Describe what you want
Gareth Rushgrove
Converge from any state
Gareth Rushgrove
The same Kubernetes Pod described in Puppet
Gareth Rushgrove
$ puppet apply examples/init.pp --test
Info: Loading facts
Notice: Compiled catalog for gareths in environment production in
1.24 seconds
Info: Applying configuration version '1453298602'
Info: Checking if sample-pod exists
Info: Creating kubernetes_pod sample-pod
Notice: /Stage[main]/Main/Kubernetes_pod[sample-pod]/ensure:
created
Notice: Applied catalog in 0.23 seconds
Running without that Pod already existing will create it
Gareth Rushgrove
Running a second time, nothing changes because

the Pod already existsGareth Rushgrove
$ puppet apply examples/init.pp --test
Info: Loading facts
Notice: Compiled catalog for garethr in environment production in
1.33 seconds
Info: Applying configuration version '1453298688'
Info: Checking if sample-pod exists
Notice: Applied catalog in 0.15 seconds
$ puppet resource kubernetes_pod sample-pod
kubernetes_pod { 'sample-pod':
ensure => 'present',
metadata => {
'creationTimestamp' => '2016-01-20T14:03:23Z',
'name' => 'sample-pod',
'namespace' => 'default',
'resourceVersion' => '4579',
'selfLink' => '/api/v1/namespaces/default/pods/sample-pod’,
'uid' => '91c8a550-bf7e-11e5-816e-42010af001b1'
},
spec => {
'containers' => [{
‘image' => 'nginx',
'imagePullPolicy' => 'IfNotPresent',
'name' => ‘container-name',
'resources' => {'requests' => {'cpu' => '100m'}}, 'terminationMessagePat
[{'mountPath' => '/var/run/secrets/kubernetes.io/serviceaccount', 'name'
'dnsPolicy' => 'ClusterFirst', 'nodeName' => 'gke-guestbook-dc15a31a-nod
puppet resource allows for interrogating an existing
Kubernetes installationGareth Rushgrove
$ kubectl describe pod sample-pod
Name: sample-pod
Namespace: default
Image(s): nginx
Node: gke-guestbook-dc15a31a-node-fyb6/10.240.
Start Time: Wed, 20 Jan 2016 14:03:23 +0000
Labels: <none>
Status: Running
Reason:
Message:
IP: 10.24.1.7
Replication Controllers: <none>
Containers:
container-name:
Container ID: docker://542389c5b2a98616ba3a8001029bc4a3f00d7c0
Image: nginx
Image ID: docker://407195ab8b07
The same information is still accessible via other tooling
Gareth Rushgrove
Other programming
languages exist
Gareth Rushgrove
DEMO
Gareth Rushgrove
More details on the official Kubernetes blog
Gareth Rushgrove
Imperative
Interfaces
Pragmatism and familiarity
Gareth Rushgrove
Gareth Rushgrove
Deis is an open source PaaS that provides a Heroku-
inspired workflow, using Kubernetes under the hoodGareth Rushgrove
Interactive CLI to login
Gareth Rushgrove
$ deis login http://deis.example.com
username: deis
password:
Logged in as deis
Create configs locally with the CLI
Gareth Rushgrove
$ deis create
Creating application... done, created boring-huntress
Git remote deis added
$ git push deis master
Counting objects: 95, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (52/52), done.
Writing objects: 100% (95/95), 20.24 KiB | 0 bytes/s, done.
Total 95 (delta 41), reused 85 (delta 37)
-----> Ruby app detected
-----> Compiling Ruby/Rack
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using 1.5.2
Running: bundle install --without development:test --path
vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from http://rubygems.org/..........
Fetching additional metadata from http://rubygems.org/..
Using bundler (1.5.2)
Installing tilt (1.3.6)
Installing rack (1.5.2)
The switch to Git for deployment
Gareth Rushgrove
Set config using CLI
Gareth Rushgrove
$ deis config:set FOO=1 BAR=baz && deis config:pull
$ cat .env
FOO=1
BAR=baz
$ echo "TIDE=high" >> .env
$ deis config:push
Creating config... done, v4
=== yuppie-earthman
DEIS_APP: yuppie-earthman
FOO: 1
BAR: baz
TIDE: high
$ deis scale web=8
Scaling processes... but first, coffee!
done in 20s
=== boring-huntress Processes
--- web:
web.1 up (v2)
web.2 up (v2)
web.3 up (v2)
web.4 up (v2)
web.5 up (v2)
web.6 up (v2)
web.7 up (v2)
web.8 up (v2)
Scale using the CLI
Gareth Rushgrove
Replication Controllers,
Services and Pods are
implementation details
Gareth Rushgrove
Kubernetes is an
implementation details from
the point of view of the user
Gareth Rushgrove
Kubernetes is NOT an
implementation details from
the point of view of the
administrator
Gareth Rushgrove
The advantages of
familiarity
Gareth Rushgrove
The challenges of git as
a user interface
Gareth Rushgrove
Ecosystems and
Interoperability
Everyone can play together
Gareth Rushgrove
Package management
Gareth Rushgrove
Gareth Rushgrove
Helm, a package manager for Kubernetes
Gareth Rushgrove
$ helm install redis-cluster
---> Running `kubectl create -f` ...
services/redis-sentinel
pods/redis-master
replicationcontrollers/redis
replicationcontrollers/redis-sentinel
---> Done
Help provides distribution tools, plus wraps kubectl
Gareth Rushgrove
Helm as a user interface
Gareth Rushgrove
Gareth Rushgrove
Charts as a place to share low level descriptions
Gareth Rushgrove
name: jenkins
home: https://jenkins-ci.org/
version: 0.2.0
description: The leading open-source continuous integration
server.
maintainers:
- Matt Fisher <mfisher@deis.com>
details:
Jenkins is the leading open-source continuous integration
server.
Chart.yaml metadata format
Gareth Rushgrove
Gareth Rushgrove
Or, what is the Kubernetes equivalent to MPM metadata?
Gareth Rushgrove
The importance of
sharing metadata
Gareth Rushgrove
Metadata as a first class
user interface
Gareth Rushgrove
If the API is the point of
interoperability, how can it
evolve safely?
Gareth Rushgrove
Gareth Rushgrove
Swagger is a specification for describing APIs
Gareth Rushgrove
Gareth Rushgrove
Now being developed by the Open API Initiative
Gareth Rushgrove
"type": "integer",
"format": "int32",
"description": "The port on each node on which this service
is exposed when type=NodePort or LoadBalancer. Usually assigned
by the system. If specified, it will be allocated to the service
if unused or else creation of the service will fail. Default is
to auto-allocate a port if the ServiceType of this Service
requires one. More info: http://releases.k8s.io/HEAD/docs/user-
guide/services.md#type--nodeport"
}
}
},
"v1.ServiceStatus": {
"id": "v1.ServiceStatus",
"description": "ServiceStatus represents the current status
of a service.",
"properties": {
"loadBalancer": {
"$ref": "v1.LoadBalancerStatus",
"description": "LoadBalancer contains the current status of
the load-balancer, if one is present."
The Kubernetes API spec is ~14,000 lines of JSON
Gareth Rushgrove
Some client libraries,
including the Puppet
module, are generated
from the Swagger spec
Gareth Rushgrove
Gareth Rushgrove
Standards mean going
slow in the right places
Gareth Rushgrove
So we can go fast
everywhere else
Gareth Rushgrove
Conclusions
Why Kubernetes as a platform
Interoperable because of a
stable set of APIs
Gareth Rushgrove
Platforms exposing high
level interfaces, without
limiting access to lower
level ones
Gareth Rushgrove
Allow for different
use-cases and different
life-cycles on the same
infrastructure
Gareth Rushgrove
Questions?
And thanks for listening

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Cantainer CI/ CD with Kubernetes
Cantainer CI/ CD with KubernetesCantainer CI/ CD with Kubernetes
Cantainer CI/ CD with Kubernetes
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Building kubectl plugins with Quarkus | DevNation Tech Talk
Building kubectl plugins with Quarkus | DevNation Tech TalkBuilding kubectl plugins with Quarkus | DevNation Tech Talk
Building kubectl plugins with Quarkus | DevNation Tech Talk
 
Pluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerPluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and Docker
 
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
 
Kernel load-balancing for Docker containers using IPVS
Kernel load-balancing for Docker containers using IPVSKernel load-balancing for Docker containers using IPVS
Kernel load-balancing for Docker containers using IPVS
 
KubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant KubernetesKubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant Kubernetes
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
KubeCon EU 2016: Templatized Application Configuration on OpenShift and Kuber...
KubeCon EU 2016: Templatized Application Configuration on OpenShift and Kuber...KubeCon EU 2016: Templatized Application Configuration on OpenShift and Kuber...
KubeCon EU 2016: Templatized Application Configuration on OpenShift and Kuber...
 
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and BeyondTectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
Kubernetes - Starting with 1.2
Kubernetes  - Starting with 1.2Kubernetes  - Starting with 1.2
Kubernetes - Starting with 1.2
 
Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)
 
Demystifying the Nuts & Bolts of Kubernetes Architecture
Demystifying the Nuts & Bolts of Kubernetes ArchitectureDemystifying the Nuts & Bolts of Kubernetes Architecture
Demystifying the Nuts & Bolts of Kubernetes Architecture
 
Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple
 
KubeCon EU 2016: ITNW (If This Now What): Orchestrating an Enterprise
KubeCon EU 2016: ITNW (If This Now What): Orchestrating an EnterpriseKubeCon EU 2016: ITNW (If This Now What): Orchestrating an Enterprise
KubeCon EU 2016: ITNW (If This Now What): Orchestrating an Enterprise
 
Kubernetes intro public - kubernetes meetup 4-21-2015
Kubernetes intro   public - kubernetes meetup 4-21-2015Kubernetes intro   public - kubernetes meetup 4-21-2015
Kubernetes intro public - kubernetes meetup 4-21-2015
 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research Platform
 

Similar a KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces

Projeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdfProjeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdf
AdrianoSantos888423
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
Ortus Solutions, Corp
 

Similar a KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces (20)

Kube Your Enthusiasm
Kube Your EnthusiasmKube Your Enthusiasm
Kube Your Enthusiasm
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiKube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul Czarkowski
 
Container orchestration from theory to practice
Container orchestration from theory to practiceContainer orchestration from theory to practice
Container orchestration from theory to practice
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
Taking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the ExtremeTaking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the Extreme
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to Kubernetes
 
Projeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdfProjeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdf
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
 
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes WorkloadsAWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
 
Istio Playground
Istio PlaygroundIstio Playground
Istio Playground
 
Kubernetes + Python = ❤ - Cloud Native Prague
Kubernetes + Python = ❤ - Cloud Native PragueKubernetes + Python = ❤ - Cloud Native Prague
Kubernetes + Python = ❤ - Cloud Native Prague
 
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema RubyTdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
 
Spring Into Kubernetes DFW
Spring Into Kubernetes DFWSpring Into Kubernetes DFW
Spring Into Kubernetes DFW
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
 
Replication - Nick Carboni - ManageIQ Design Summit 2016
Replication - Nick Carboni - ManageIQ Design Summit 2016Replication - Nick Carboni - ManageIQ Design Summit 2016
Replication - Nick Carboni - ManageIQ Design Summit 2016
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
 
CloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. Java
CloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. JavaCloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. Java
CloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. Java
 

Más de KubeAcademy

KubeCon EU 2016: SmartCity IoT on Kubernetes
KubeCon EU 2016: SmartCity IoT on KubernetesKubeCon EU 2016: SmartCity IoT on Kubernetes
KubeCon EU 2016: SmartCity IoT on Kubernetes
KubeAcademy
 

Más de KubeAcademy (20)

KubeCon EU 2016: Distributed containers in the physical world
KubeCon EU 2016: Distributed containers in the physical worldKubeCon EU 2016: Distributed containers in the physical world
KubeCon EU 2016: Distributed containers in the physical world
 
KubeCon EU 2016:
KubeCon EU 2016: KubeCon EU 2016:
KubeCon EU 2016:
 
KubeCon EU 2016: ChatOps and Automatic Deployment on Kubernetes
KubeCon EU 2016: ChatOps and Automatic Deployment on KubernetesKubeCon EU 2016: ChatOps and Automatic Deployment on Kubernetes
KubeCon EU 2016: ChatOps and Automatic Deployment on Kubernetes
 
KubeCon EU 2016: A Practical Guide to Container Scheduling
KubeCon EU 2016: A Practical Guide to Container SchedulingKubeCon EU 2016: A Practical Guide to Container Scheduling
KubeCon EU 2016: A Practical Guide to Container Scheduling
 
KubeCon EU 2016: Trading in the Kube
KubeCon EU 2016: Trading in the KubeKubeCon EU 2016: Trading in the Kube
KubeCon EU 2016: Trading in the Kube
 
KubeCon EU 2016: Integrated trusted computing in Kubernetes
KubeCon EU 2016: Integrated trusted computing in KubernetesKubeCon EU 2016: Integrated trusted computing in Kubernetes
KubeCon EU 2016: Integrated trusted computing in Kubernetes
 
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipelineKubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
 
KubeCon EU 2016: Secure, Cloud-Native Networking with Project Calico
KubeCon EU 2016: Secure, Cloud-Native Networking with Project CalicoKubeCon EU 2016: Secure, Cloud-Native Networking with Project Calico
KubeCon EU 2016: Secure, Cloud-Native Networking with Project Calico
 
KubeCon EU 2016: Heroku to Kubernetes
KubeCon EU 2016: Heroku to KubernetesKubeCon EU 2016: Heroku to Kubernetes
KubeCon EU 2016: Heroku to Kubernetes
 
KubeCon EU 2016: Transforming the Government
KubeCon EU 2016: Transforming the Government KubeCon EU 2016: Transforming the Government
KubeCon EU 2016: Transforming the Government
 
KubeCon EU 2016: Getting the Jobs Done With Kubernetes
KubeCon EU 2016: Getting the Jobs Done With KubernetesKubeCon EU 2016: Getting the Jobs Done With Kubernetes
KubeCon EU 2016: Getting the Jobs Done With Kubernetes
 
KubeCon EU 2016: Kubernetes Storage 101
KubeCon EU 2016: Kubernetes Storage 101KubeCon EU 2016: Kubernetes Storage 101
KubeCon EU 2016: Kubernetes Storage 101
 
KubeCon EU 2016: Using Traffic Control to Test Apps in Kubernetes
KubeCon EU 2016: Using Traffic Control to Test Apps in KubernetesKubeCon EU 2016: Using Traffic Control to Test Apps in Kubernetes
KubeCon EU 2016: Using Traffic Control to Test Apps in Kubernetes
 
KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom
KubeCon EU 2016: Kubernetes in Production in The New York Times newsroomKubeCon EU 2016: Kubernetes in Production in The New York Times newsroom
KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom
 
KubeCon EU 2016: SmartCity IoT on Kubernetes
KubeCon EU 2016: SmartCity IoT on KubernetesKubeCon EU 2016: SmartCity IoT on Kubernetes
KubeCon EU 2016: SmartCity IoT on Kubernetes
 
KubeCon EU 2016 Keynote: Pushing Kubernetes Forward
KubeCon EU 2016 Keynote: Pushing Kubernetes ForwardKubeCon EU 2016 Keynote: Pushing Kubernetes Forward
KubeCon EU 2016 Keynote: Pushing Kubernetes Forward
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
 
KubeCon EU 2016: Killing containers to make weather beautiful
KubeCon EU 2016: Killing containers to make weather beautifulKubeCon EU 2016: Killing containers to make weather beautiful
KubeCon EU 2016: Killing containers to make weather beautiful
 
KubeCon EU 2016: Bringing an open source Containerized Container Platform to ...
KubeCon EU 2016: Bringing an open source Containerized Container Platform to ...KubeCon EU 2016: Bringing an open source Containerized Container Platform to ...
KubeCon EU 2016: Bringing an open source Containerized Container Platform to ...
 
KubeCon EU 2016: "rktnetes": what's new with container runtimes and Kubernetes
KubeCon EU 2016: "rktnetes": what's new with container runtimes and KubernetesKubeCon EU 2016: "rktnetes": what's new with container runtimes and Kubernetes
KubeCon EU 2016: "rktnetes": what's new with container runtimes and Kubernetes
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces

  • 1. Kubernetes and the Potential for Higher Level Interfaces Puppet Labs Gareth Rushgrove Ecosystems, APIs and user needs
  • 4. Human and computer interfaces Concepts and demos Ecosystems and interoperability Gareth Rushgrove - - -
  • 5. The User Interface(s) of Kubernetes What do we mean by user and interface?
  • 6. The user context matters Gareth Rushgrove
  • 9. Building something new Running in production Gareth Rushgrove - -
  • 12. kubectl is a user interface Gareth Rushgrove
  • 13. YAML is a user interface Gareth Rushgrove
  • 14. Gareth Rushgrove Dashboard is a user interface Gareth Rushgrove
  • 15. The API is a user interface Gareth Rushgrove
  • 16. Client libraries are a user interface Gareth Rushgrove
  • 17. Different interfaces are useful in different contexts Gareth Rushgrove
  • 18. Different people might use different interfaces to achieve different tasks Gareth Rushgrove
  • 19. Out of the box Just enough user interface
  • 21. $ kubectl controls the Kubernetes cluster manager. Find more information at https://github.com/kubernetes/kubernetes. Usage: kubectl [flags] kubectl [command] Available Commands: get Display one or many resources describe Show details of a specific resource or group of resources create Create a resource by filename or stdin replace Replace a resource by filename or stdin. patch Update field(s) of a resource by stdin. delete Delete resources by filenames, stdin, resources and names, or by resources and label selector. edit Edit a resource on the server A universal interface for actions on a Kubernetes cluster Gareth Rushgrove
  • 24. template: metadata: labels: app: guestbook tier: frontend spec: containers: - name: php-redis image: gcr.io/google_samples/gb-frontend:v4 resources: requests: cpu: 100m memory: 100Mi env: - name: GET_HOSTS_FROM value: dns # If your cluster config does not include a dns service, then to A data format describing desired state Gareth Rushgrove
  • 25. API wire format as user interface Gareth Rushgrove
  • 26. But isn’t YAML declarative? And other user interface tales
  • 28. Code plus data has advantages over data alone Gareth Rushgrove
  • 29. The language to represent the data should be a simple, data-only format such as JSON or YAML, and programmatic modification of this data should be done in a real programming language Gareth Rushgrove Borg, Omega, and Kubernetes, ACM Queue,Volume 14, issue 1 http://queue.acm.org/detail.cfm?id=2898444 “
  • 30. Avoid repetition Combine external inputs Correctness Abstractions Gareth Rushgrove - - - -
  • 31. So why are so many people hand writing YAML? Gareth Rushgrove
  • 32. Changes with kubectle patch diverge from the model $ kubectl patch --help Update field(s) of a resource using strategic merge patch JSON and YAML formats are accepted. Usage: kubectl patch (-f FILENAME | TYPE NAME) -p PATCH [flags] Examples: # Partially update a node using strategic merge patch kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}' Gareth Rushgrove
  • 33. $ kubectl apply --help Apply a configuration to a resource by filename or stdin. JSON and YAML formats are accepted. Usage: kubectl apply -f FILENAME [flags] Examples: # Apply the configuration in pod.json to a pod. $ kubectl apply -f ./pod.json And kubectl apply requires the full object serialisation Gareth Rushgrove
  • 34. A familiar Kubernetes Pod definition in YAML Gareth Rushgrove
  • 35. What happens if you run the same YAML file twice? Gareth Rushgrove
  • 36. How many times do you have to repeat the same label? Gareth Rushgrove
  • 37. kubectl is actually pretty low-level Gareth Rushgrove
  • 38. kubectl get pod mypod -o yaml | sed 's/(image: myimage):.*$/1:v4/' | kubectl replace -f - This is from the official kubectl help. It pipes to sed. Gareth Rushgrove
  • 39. Declarative code with an idempotent runtime model Gareth Rushgrove
  • 40. Describe what you want Gareth Rushgrove
  • 41. Converge from any state Gareth Rushgrove
  • 42. The same Kubernetes Pod described in Puppet Gareth Rushgrove
  • 43. $ puppet apply examples/init.pp --test Info: Loading facts Notice: Compiled catalog for gareths in environment production in 1.24 seconds Info: Applying configuration version '1453298602' Info: Checking if sample-pod exists Info: Creating kubernetes_pod sample-pod Notice: /Stage[main]/Main/Kubernetes_pod[sample-pod]/ensure: created Notice: Applied catalog in 0.23 seconds Running without that Pod already existing will create it Gareth Rushgrove
  • 44. Running a second time, nothing changes because the Pod already existsGareth Rushgrove $ puppet apply examples/init.pp --test Info: Loading facts Notice: Compiled catalog for garethr in environment production in 1.33 seconds Info: Applying configuration version '1453298688' Info: Checking if sample-pod exists Notice: Applied catalog in 0.15 seconds
  • 45. $ puppet resource kubernetes_pod sample-pod kubernetes_pod { 'sample-pod': ensure => 'present', metadata => { 'creationTimestamp' => '2016-01-20T14:03:23Z', 'name' => 'sample-pod', 'namespace' => 'default', 'resourceVersion' => '4579', 'selfLink' => '/api/v1/namespaces/default/pods/sample-pod’, 'uid' => '91c8a550-bf7e-11e5-816e-42010af001b1' }, spec => { 'containers' => [{ ‘image' => 'nginx', 'imagePullPolicy' => 'IfNotPresent', 'name' => ‘container-name', 'resources' => {'requests' => {'cpu' => '100m'}}, 'terminationMessagePat [{'mountPath' => '/var/run/secrets/kubernetes.io/serviceaccount', 'name' 'dnsPolicy' => 'ClusterFirst', 'nodeName' => 'gke-guestbook-dc15a31a-nod puppet resource allows for interrogating an existing Kubernetes installationGareth Rushgrove
  • 46. $ kubectl describe pod sample-pod Name: sample-pod Namespace: default Image(s): nginx Node: gke-guestbook-dc15a31a-node-fyb6/10.240. Start Time: Wed, 20 Jan 2016 14:03:23 +0000 Labels: <none> Status: Running Reason: Message: IP: 10.24.1.7 Replication Controllers: <none> Containers: container-name: Container ID: docker://542389c5b2a98616ba3a8001029bc4a3f00d7c0 Image: nginx Image ID: docker://407195ab8b07 The same information is still accessible via other tooling Gareth Rushgrove
  • 48. DEMO
  • 49. Gareth Rushgrove More details on the official Kubernetes blog Gareth Rushgrove
  • 52. Gareth Rushgrove Deis is an open source PaaS that provides a Heroku- inspired workflow, using Kubernetes under the hoodGareth Rushgrove
  • 53. Interactive CLI to login Gareth Rushgrove $ deis login http://deis.example.com username: deis password: Logged in as deis
  • 54. Create configs locally with the CLI Gareth Rushgrove $ deis create Creating application... done, created boring-huntress Git remote deis added
  • 55. $ git push deis master Counting objects: 95, done. Delta compression using up to 8 threads. Compressing objects: 100% (52/52), done. Writing objects: 100% (95/95), 20.24 KiB | 0 bytes/s, done. Total 95 (delta 41), reused 85 (delta 37) -----> Ruby app detected -----> Compiling Ruby/Rack -----> Using Ruby version: ruby-1.9.3 -----> Installing dependencies using 1.5.2 Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment Fetching gem metadata from http://rubygems.org/.......... Fetching additional metadata from http://rubygems.org/.. Using bundler (1.5.2) Installing tilt (1.3.6) Installing rack (1.5.2) The switch to Git for deployment Gareth Rushgrove
  • 56. Set config using CLI Gareth Rushgrove $ deis config:set FOO=1 BAR=baz && deis config:pull $ cat .env FOO=1 BAR=baz $ echo "TIDE=high" >> .env $ deis config:push Creating config... done, v4 === yuppie-earthman DEIS_APP: yuppie-earthman FOO: 1 BAR: baz TIDE: high
  • 57. $ deis scale web=8 Scaling processes... but first, coffee! done in 20s === boring-huntress Processes --- web: web.1 up (v2) web.2 up (v2) web.3 up (v2) web.4 up (v2) web.5 up (v2) web.6 up (v2) web.7 up (v2) web.8 up (v2) Scale using the CLI Gareth Rushgrove
  • 58. Replication Controllers, Services and Pods are implementation details Gareth Rushgrove
  • 59. Kubernetes is an implementation details from the point of view of the user Gareth Rushgrove
  • 60. Kubernetes is NOT an implementation details from the point of view of the administrator Gareth Rushgrove
  • 62. The challenges of git as a user interface Gareth Rushgrove
  • 66. Gareth Rushgrove Helm, a package manager for Kubernetes Gareth Rushgrove
  • 67. $ helm install redis-cluster ---> Running `kubectl create -f` ... services/redis-sentinel pods/redis-master replicationcontrollers/redis replicationcontrollers/redis-sentinel ---> Done Help provides distribution tools, plus wraps kubectl Gareth Rushgrove
  • 68. Helm as a user interface Gareth Rushgrove
  • 69. Gareth Rushgrove Charts as a place to share low level descriptions Gareth Rushgrove
  • 70. name: jenkins home: https://jenkins-ci.org/ version: 0.2.0 description: The leading open-source continuous integration server. maintainers: - Matt Fisher <mfisher@deis.com> details: Jenkins is the leading open-source continuous integration server. Chart.yaml metadata format Gareth Rushgrove
  • 71. Gareth Rushgrove Or, what is the Kubernetes equivalent to MPM metadata? Gareth Rushgrove
  • 72. The importance of sharing metadata Gareth Rushgrove
  • 73. Metadata as a first class user interface Gareth Rushgrove
  • 74. If the API is the point of interoperability, how can it evolve safely? Gareth Rushgrove
  • 75. Gareth Rushgrove Swagger is a specification for describing APIs Gareth Rushgrove
  • 76. Gareth Rushgrove Now being developed by the Open API Initiative Gareth Rushgrove
  • 77. "type": "integer", "format": "int32", "description": "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: http://releases.k8s.io/HEAD/docs/user- guide/services.md#type--nodeport" } } }, "v1.ServiceStatus": { "id": "v1.ServiceStatus", "description": "ServiceStatus represents the current status of a service.", "properties": { "loadBalancer": { "$ref": "v1.LoadBalancerStatus", "description": "LoadBalancer contains the current status of the load-balancer, if one is present." The Kubernetes API spec is ~14,000 lines of JSON Gareth Rushgrove
  • 78. Some client libraries, including the Puppet module, are generated from the Swagger spec Gareth Rushgrove
  • 80. Standards mean going slow in the right places Gareth Rushgrove
  • 81. So we can go fast everywhere else Gareth Rushgrove
  • 83. Interoperable because of a stable set of APIs Gareth Rushgrove
  • 84. Platforms exposing high level interfaces, without limiting access to lower level ones Gareth Rushgrove
  • 85. Allow for different use-cases and different life-cycles on the same infrastructure Gareth Rushgrove