SlideShare una empresa de Scribd logo
1 de 75
Kubernetes, beyond the core
Craig Box
@craigbox
Container Camp London // @craigboxGoogle Cloud Platform 2
A quick recap
Container Camp London // @craigboxGoogle Cloud Platform 4
● Lightweight
● Hermetically sealed
● Isolated
● Easily deployable
● Introspectable
● Runnable
Containers: a quick recap
i'm boring core
infrastructure!
Linux processes
● Improves overall developer experience
● Fosters code and component reuse
● Simplifies operations for cloud native applications
Container Camp London // @craigboxGoogle Cloud Platform 5
● Scheduling: Decide where my containers should run
● Lifecycle and health: Keep my containers running despite
failures
● Scaling: Make sets of containers bigger or smaller
● Naming and discovery: Find where my containers are now
● Load balancing: Distribute traffic across a set of containers
● Storage volumes: Provide data to containers
● Logging and monitoring: Track what’s happening with my
containers
● Debugging and introspection: Enter or attach to containers
● Identity and authorization: Control who can do things to my
containers
Kubernetes: a quick recap
Container Camp London // @craigboxGoogle Cloud Platform 6
● Kubernetes is one of the three legs of Cloud Native
○ Takes in container packaged apps
○ Emits microservices architectures
● Announced June 2014, in GA since June 2015
● 1.4 is due out in 1 week!
● Under half the code is now written by Google
● Stewarded by the Cloud Native Compute Foundation™
○ A Linux Foundation Collaborative Project™
Kubernetes: a quick recap
Container Camp London // @craigboxGoogle Cloud Platform 7
Kubernetes is stable
● Concrete ideas from 10 years of production experience
○ and mistakes!
● v1 API; breaking changes held until v2
● Alpha, Beta and GA tracks for new features
● Thorough end-to-end testing
● New work taking place outside of core
○ Volume & network plugins
○ Custom controllers
○ ThirdPartyResources
Container Camp London // @craigboxGoogle Cloud Platform 8
Kubernetes has a solid core
● Core primitives:
○ pods, services, volumes, labels, controllers, etc
● Continual improvement using these basic concepts
○ Ingress: connect a load balancer to a Service
○ ReplicaSet: fungible replicas
○ DaemonSet: put a pod on every node
○ Job: batch workloads
○ ScheduledJob: run a Job at a certain time (cron)
Container Camp London // @craigboxGoogle Cloud Platform 9
Kubernetes has
a healthy ecosystem
Some examples:
● Cloud providers: Azure, VMware, Openstack, Rackspace, CenturyLink
● Distros: CoreOS Tectonic, Mirantis Murano (OpenStack), RedHat
Atomic, Hyper.sh, VMTurbo
● PaaS: RedHat OpenShift, Deis, Rancher, WSO2, Gondor/Kel, Apcera
● CD: Fabric8, Shippable, CloudBees, Solano
● Deployment: Kumoru, Redspread, Spinnaker
● Package managers: Helm, KPM
● Monitoring: Prometheus, Sysdig, Datadog
● Networking: Weaveworks, Tigera, OpenContrail
● Storage: NetApp, ClusterHQ
● Appliances: Redapt, Diamante
Container Camp London // @craigboxGoogle Cloud Platform 10
Kubernetes has great momentum
To host a similar set of services on our older Openstack environment
would require at least 2-3x the number of servers. The cost savings
isn't even the best part. Kubernetes has allowed us to build a
completely self-service pipeline for our devs and has taken the ops
team out of day-to-day app management. The nodes update
themselves with the latest OS and Kube shifts the workload around
as they do. This infrastructure is faster, more nimble, more
cost-effective and so much easier to run.
This is the best infrastructure I've ever used in twenty years
of doing ops and leading ops teams.
Since we started using kubernetes, we reduced our bill to 30%
of its original price, and it made everything easier and scalable
just as if we were using the costly [alternative]
Your cluster turnup story is bad, and you should feel bad
awwwwwwkward
laptop$ kubeadm --help
kubeadm: bootstrap a secure Kubernetes cluster easily.
/==========================================================
| KUBEADM IS ALPHA, DO NOT USE IT FOR PRODUCTION CLUSTERS! |
| |
| But, please try it out! Give us feedback at: |
| https://github.com/kubernetes/kubernetes/issues |
| and at-mention @kubernetes/sig-cluster-lifecycle |
==========================================================/
Example usage:
Create a two-machine cluster with one master (which controls the cluster),
and one node (where workloads, like pods and containers run).
On the first machine
====================
master# kubeadm init master
Your token is: <token>
On the second machine
=====================
node# kubeadm join node --token=<token> <ip-of-master>
Moving beyond stateless
Container Camp London // @craigboxGoogle Cloud Platform 16
The problems to be solved
1. Preserve individual identity for fungible entities
2. Provide predictable ordering and control as those entities change
3. To enable the software entities to identify and recognize the other entities
by those identities
4. To get access to a consistent storage mechanism (because their identity
also corresponds to data)
Container Camp London // @craigboxGoogle Cloud Platform 17
I apologise in advance for this horrible metaphor
Container Camp London // @craigboxGoogle Cloud Platform 18
Pets vs Cattle
It's so horrible it can only be written in Comic Sans
Sometimes pets are
Indistinguishable
from cattle
Sometimes cattle
are pets
Sometimes cattle are
just plain adorable
Sometimes cattle
come pre-numbered
Container Camp London // @craigboxGoogle Cloud Platform 23
It's not just the "pet" part
Container Camp London // @craigboxGoogle Cloud Platform 25
Naming things is hard
Container Camp London // @craigboxGoogle Cloud Platform 27
(In fairness, I can tell you the UDP joke, but I can't guarantee you will get it)
Container Camp London // @craigboxGoogle Cloud Platform 28
What is a pet?
A Pet Set ensures that a specified number of “pets” with unique identities are
running at any given time.
The identity of a Pet is comprised of:
● a stable hostname, available in DNS
● an ordinal index
● stable storage: linked to the ordinal & hostname
Container Camp London // @craigboxGoogle Cloud Platform 29
you're awesomethree please
ReplicaSets
Master
Container Camp London // @craigboxGoogle Cloud Platform 30
you're awesome
ReplicaSets
web-7ci7o
web-kzszj
web-qqcnn
Master
Container Camp London // @craigboxGoogle Cloud Platform 31
bleep, bloopsix please
ReplicaSets
web-7ci7o
web-kzszj
web-qqcnn
Master
Container Camp London // @craigboxGoogle Cloud Platform 32
bleep, bloop
ReplicaSets
web-7ci7o
web-kzszj
web-qqcnn
Master
web-khku8
web-nacti
web-z9gth
Container Camp London // @craigboxGoogle Cloud Platform 33
ReplicaSets
web-7ci7o
web-kzszj
web-qqcnn
Master
web-khku8
web-nacti
web-z9gth
at least i'm not
passing the butter
lol jk, 2 is plenty
Container Camp London // @craigboxGoogle Cloud Platform 34
ReplicaSets
web-7ci7o
Master
web-z9gth
at least i'm not
passing the butter
Container Camp London // @craigboxGoogle Cloud Platform 35
you're awesome
three please,
with storage
PetSets
Master
Container Camp London // @craigboxGoogle Cloud Platform 36
you're awesome
three please,
with storage
PetSets
db-0
Master
pvc-db-0pv-db-0
1:1 mapping
Container Camp London // @craigboxGoogle Cloud Platform 37
you're awesome
three please,
with storage
PetSets
db-0
db-1
Master
pvc-db-0
pvc-db-1
pv-db-0
pv-db-1
1:1 mapping
Container Camp London // @craigboxGoogle Cloud Platform 38
you're awesome
PetSets
db-0
db-1
db-2
Master
pvc-db-0
pvc-db-1
pvc-db-2
pv-db-0
pv-db-1
pv-db-2
1:1 mapping
Container Camp London // @craigboxGoogle Cloud Platform 39
no robots shall
touch my pets
PetSets
db-0
db-1
db-2
Master
pvc-db-0
pvc-db-1
pvc-db-2
pv-db-0
pv-db-1
pv-db-2
scale down to
2, please
Container Camp London // @craigboxGoogle Cloud Platform 40
no robots shall
touch my pets
PetSets
db-0
db-1
Master
pvc-db-0
pvc-db-1
pvc-db-2
pv-db-0
pv-db-1
I might come in
useful some day
Container Camp London // @craigboxGoogle Cloud Platform 41
What other problems do I have?
● Discovery of peers for quorum
○ Sidecars and peer finder scripts
● Startup/teardown ordering
○ Init containers
○ Implicit ordering
Container Camp London // @craigboxGoogle Cloud Platform 42
InitContainers
db-0
Mount some
things
Container Camp London // @craigboxGoogle Cloud Platform 43
InitContainers
db-0
Mount some
things
pv-db-0
Container Camp London // @craigboxGoogle Cloud Platform 44
InitContainers
db-0
Copy some
stuff
pv-db-0
Container Camp London // @craigboxGoogle Cloud Platform 45
InitContainers
db-0
Write some
configs
pv-db-0
DNS
Container Camp London // @craigboxGoogle Cloud Platform 46
InitContainers
db-0
Be a database
pv-db-0
Container Camp London // @craigboxGoogle Cloud Platform 47
● InitContainers and PetSet introduced in 1.3
● InitContainers are Beta in 1.4
● PetSet remain in Alpha
"The real P0 beta blocker is solid prototypes that
increase our confidence in the core feature set."
https://github.com/kubernetes/charts/tree/master/incubator
Status: Alpha
Thanks to Christian and Matt from
Moving beyond the cluster
Container Camp London // @craigboxGoogle Cloud Platform 49
Some terminology
● What is a cluster?
○ A bunch of machines on a high-speed network
● What is high-speed?
○ Generally "in the same building"
○ Same latency and throughput between any two machines
● How much is a bunch?
○ Enough to get the benefits of packing
○ Not too many to Accidentally Kill Everything
Container Camp London // @craigboxGoogle Cloud Platform 50
shared cell
(original)
shared cell
(compacted)
non-prod load
(compacted)
prod-only load
(compacted)
# machines
25% overhead
The bigger
the bin,
the better
the packing
Container Camp London // @craigboxGoogle Cloud Platform 51
How to separate
● Within a cluster
○ Use namespaces
● Within a region
○ Use NodePools to create "regional" cluster
● With multiple regions
○ Use cluster federation
Container Camp London // @craigboxGoogle Cloud Platform 52
etcd
scheduler
controllers
apiserver
Users Master Nodes
kubelet
kubelet
kubelet
CLI
UI
API
Single Kubernetes cluster
Container Camp London // @craigboxGoogle Cloud Platform 53
Container
Cluster
All you care about
API
Container Camp London // @craigboxGoogle Cloud Platform 54
kubelet
Control Plane
Users Control Plane Clusters
Federation
APICLI
UI
API
Container Camp London // @craigboxGoogle Cloud Platform 55
Cluster 2
us-central1-b
Cluster 1
us-east1-b
Cluster 3
europe-west1-b
Cluster 4
asia-east1-b
API CLI
UI
Create the clusters
API API API API
Container Camp London // @craigboxGoogle Cloud Platform 56
Federation consists of
● Namespace
● API Server Service with public VIP
● API Server Deployment with 2 replicas
● Controller Manager Pod with 1 replica
● Database key/value store
Familiar? --context=federation-cluster
Deploy the Federated Control Plane
Cluster 2
us-central1-b
Cluster 1
us-east1-b
Cluster 3
europe-west1-b
Cluster 4
asia-east1-b
API API API API
Container Camp London // @craigboxGoogle Cloud Platform 57
Add clusters to federation
Cluster 2
us-central1-b
Cluster 1
us-east1-b
Cluster 3
europe-west1-b
Cluster 4
asia-east1-b
API API API API
Federation Control Plane
kubectl --context=federation-cluster create -f clusters/gce-asia-east1.yaml
apiVersion: federation/v1beta1
kind: Cluster
metadata:
name: gce-asia-east1
spec:
serverAddressByClientCIDRs:
- clientCIDR: "0.0.0.0/0"
serverAddress: "https://257.100.194.68"
secretRef:
name: gce-asia-east1
Container Camp London // @craigboxGoogle Cloud Platform 58
Deploy a federated ReplicaSet
Cluster 2
us-central1-b
Cluster 1
us-east1-b
Cluster 3
europe-west1-b
Cluster 4
asia-east1-b
API API API API
Federation Control Plane
kubectl --context=federation-cluster create -f rs/nginx.yaml
apiVersion: extensions/v1beta1
kind: ReplicaSet
metadata:
name: nginx
spec:
replicas: 4
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.10
me again
Container Camp London // @craigboxGoogle Cloud Platform 59
Deploy a federated Service
Cluster 2
us-central1-b
Cluster 1
us-east1-b
Cluster 3
europe-west1-b
Cluster 4
asia-east1-b
API API API API
Federation Control Plane
kubectl --context=federation-cluster create -f service/nginx.yaml
apiVersion: v1
kind: Service
metadata:
labels:
app: nginx
name: nginx
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
name: http
selector:
app: nginx
type: LoadBalancer
Container Camp London // @craigboxGoogle Cloud Platform 60
Each service shard gets a load balancer
Cluster 1
us-east1-b
Cluster 2
us-central1-b
Cluster 3
europe-west1-b
Cluster 4
asia-east1-b
Container Camp London // @craigboxGoogle Cloud Platform 61
...and each service creates a DNS entry
Container Camp London // @craigboxGoogle Cloud Platform 62
Cross-cluster service discovery
Cluster 1
us-east1-b
Cluster 2
us-central1-b
Cluster 3
europe-west1-b
Cluster 4
asia-east1-b
nslookup nginx.default.federation.svc.federation.com
Container Camp London // @craigboxGoogle Cloud Platform 63
Cross-cluster service discovery
Cluster 1
us-east1-b
Cluster 2
us-central1-b
Cluster 3
europe-west1-b
Cluster 4
asia-east1-b
nslookup nginx.default.federation.svc.federation.com
DNS
Clusters 3 and 4
Container Camp London // @craigboxGoogle Cloud Platform 64
Cross-cluster service discovery
Cluster 1
us-east1-b
Cluster 2
us-central1-b
Cluster 3
europe-west1-b
Cluster 4
asia-east1-b
Container Camp London // @craigboxGoogle Cloud Platform 65
Cross-cluster service discovery
Cluster 1
us-east1-b
Cluster 2
us-central1-b
Cluster 3
europe-west1-b
Cluster 4
asia-east1-b
Container Camp London // @craigboxGoogle Cloud Platform 66
Cross-cluster service discovery
Cluster 1
us-east1-b
Cluster 2
us-central1-b
Cluster 4
asia-east1-b
Container Camp London // @craigboxGoogle Cloud Platform 67
Cross-cluster service discovery
Cluster 1
us-east1-b
Cluster 2
us-central1-b
Cluster 4
asia-east1-b
Container Camp London // @craigboxGoogle Cloud Platform 68
Cross-cluster service discovery
Cluster 1
us-east1-b
Cluster 2
us-central1-b
Cluster 4
asia-east1-b
Container Camp London // @craigboxGoogle Cloud Platform 69
Stop the presses: Federated Ingress
Cluster 1
us-east1-b
Cluster 2
us-central1-b
Cluster 3
europe-west1-b
Cluster 4
asia-east1-b
Google's Magic Global Load Balancer
Container Camp London // @craigboxGoogle Cloud Platform 70
Q2 2016 Q3 2016 Q4 2016 (**) 2017 and beyond (**)
Beta 1
● Public facing,
multi-region/Cloud,
cross-cluster
service discovery
(internal/external DNS)
● Service object API
support
Beta 2
● Replica Sets
● Multi-region Ingress (L7)
Load Balancing across
clusters for GCP only
Beta 3
● Cross-provider,
multi-region Ingress (L7)
Load Balancing
● GKE IAM Integration
GA!
● Non-public-facing
cross-cluster
service discovery
● Full support for
Kubernetes API objects
● UI support for
Federated Clusters
● Federated IAM
● GKE hosted control plane
(**) - this is a proposed roadmap. Items listed here are subject to change.
Status: Beta
Container Camp London // @craigboxGoogle Cloud Platform 71
● Kubernetes Cluster Federation Sneak Peak
● Kubernetes Cluster Federation using GKE
● Cluster Federation Admin Guide
● Cross Cluster Service Discovery Deployment Guide
● Cross Cluster Services - Achieving Higher Availability for your Kubernetes Applications
Also,
● Participate with us on the Kubernetes #sig-federation
● Post issues or feature requests on GitHub
● Join us in the #federation channel on Slack
Want to learn more?
One more thing...
Not really
Container Camp London // @craigboxGoogle Cloud Platform 73
1.4 is coming soon!
● Use Swagger 2.0, enabled non-go clients
● StorageClass
● AppArmor Support
● PodSecurityPolicy
● New Volume Plugins: Quobyte and Azure Data Disk
● Dashboard UI
● ScheduledJobs
● InitContainers
● Workloads installable with 1 command
● GCI as default Node Image
● GKE: Curated IAM Roles
● GKE: Alpha Clusters
● GKE: Available in Oregon (and soon in Japan)
● Federate all the things:
○ Ingress for GCP
○ Namespaces
○ Services
○ Secrets
○ ReplicaSets
● Federation Events
● PodDisruptionBudget
● Ingress for Multizone Clusters
● Prioritized Scheduling of Cluster Add-ons
● Container Image Policy
● Workload spreading across failure domains
● Kubelet TLS Bootstrap
● External Source IP Preservation
● Audit Logging
Thank you
Thank you@craigbox

Más contenido relacionado

La actualidad más candente

Kubernetes and OpenStack at Scale
Kubernetes and OpenStack at ScaleKubernetes and OpenStack at Scale
Kubernetes and OpenStack at ScaleStephen Gordon
 
Running Production-Grade Kubernetes on AWS
Running Production-Grade Kubernetes on AWSRunning Production-Grade Kubernetes on AWS
Running Production-Grade Kubernetes on AWSDoiT International
 
Introduction kubernetes 2017_12_24
Introduction kubernetes 2017_12_24Introduction kubernetes 2017_12_24
Introduction kubernetes 2017_12_24Sam Zheng
 
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 Wojciech Barczyński
 
Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2Hao H. Zhang
 
KubeCon EU 2016: Heroku to Kubernetes
KubeCon EU 2016: Heroku to KubernetesKubeCon EU 2016: Heroku to Kubernetes
KubeCon EU 2016: Heroku to KubernetesKubeAcademy
 
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 ForwardKubeAcademy
 
OpenStack Magnum
OpenStack MagnumOpenStack Magnum
OpenStack MagnumAdrian Otto
 
k8s NodeSet
k8s NodeSet k8s NodeSet
k8s NodeSet loodse
 
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019confluent
 
Openstack Summit Container Day Keynote
Openstack Summit Container Day KeynoteOpenstack Summit Container Day Keynote
Openstack Summit Container Day KeynoteBoyd Hemphill
 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformBob Killen
 
Kubernetes - A Short Ride Throught the project and its ecosystem
Kubernetes - A Short Ride Throught the project and its ecosystemKubernetes - A Short Ride Throught the project and its ecosystem
Kubernetes - A Short Ride Throught the project and its ecosystemMaciej Kwiek
 
Autoscaling Kubernetes
Autoscaling KubernetesAutoscaling Kubernetes
Autoscaling Kubernetescraigbox
 
Running and Managing Kubernetes on OpenStack
Running and Managing Kubernetes on OpenStackRunning and Managing Kubernetes on OpenStack
Running and Managing Kubernetes on OpenStackVictor Palma
 
Craig Box (Google) - The road to Kubernetes 1.0
Craig Box (Google) - The road to Kubernetes 1.0Craig Box (Google) - The road to Kubernetes 1.0
Craig Box (Google) - The road to Kubernetes 1.0Outlyer
 
Kubernetes service with ha
Kubernetes service with haKubernetes service with ha
Kubernetes service with haSam Zheng
 

La actualidad más candente (20)

Kubernetes and OpenStack at Scale
Kubernetes and OpenStack at ScaleKubernetes and OpenStack at Scale
Kubernetes and OpenStack at Scale
 
Running Production-Grade Kubernetes on AWS
Running Production-Grade Kubernetes on AWSRunning Production-Grade Kubernetes on AWS
Running Production-Grade Kubernetes on AWS
 
Introduction kubernetes 2017_12_24
Introduction kubernetes 2017_12_24Introduction kubernetes 2017_12_24
Introduction kubernetes 2017_12_24
 
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
 
Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2
 
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 Keynote: Pushing Kubernetes Forward
KubeCon EU 2016 Keynote: Pushing Kubernetes ForwardKubeCon EU 2016 Keynote: Pushing Kubernetes Forward
KubeCon EU 2016 Keynote: Pushing Kubernetes Forward
 
OpenStack Magnum
OpenStack MagnumOpenStack Magnum
OpenStack Magnum
 
k8s NodeSet
k8s NodeSet k8s NodeSet
k8s NodeSet
 
From Code to Kubernetes
From Code to KubernetesFrom Code to Kubernetes
From Code to Kubernetes
 
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
 
Openstack Summit Container Day Keynote
Openstack Summit Container Day KeynoteOpenstack Summit Container Day Keynote
Openstack Summit Container Day Keynote
 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research Platform
 
Kubernetes - A Short Ride Throught the project and its ecosystem
Kubernetes - A Short Ride Throught the project and its ecosystemKubernetes - A Short Ride Throught the project and its ecosystem
Kubernetes - A Short Ride Throught the project and its ecosystem
 
Autoscaling Kubernetes
Autoscaling KubernetesAutoscaling Kubernetes
Autoscaling Kubernetes
 
Running and Managing Kubernetes on OpenStack
Running and Managing Kubernetes on OpenStackRunning and Managing Kubernetes on OpenStack
Running and Managing Kubernetes on OpenStack
 
Craig Box (Google) - The road to Kubernetes 1.0
Craig Box (Google) - The road to Kubernetes 1.0Craig Box (Google) - The road to Kubernetes 1.0
Craig Box (Google) - The road to Kubernetes 1.0
 
K8s
K8sK8s
K8s
 
Docker for HPC in a Nutshell
Docker for HPC in a NutshellDocker for HPC in a Nutshell
Docker for HPC in a Nutshell
 
Kubernetes service with ha
Kubernetes service with haKubernetes service with ha
Kubernetes service with ha
 

Similar a Container Camp London (2016-09-09)

K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingPiotr Perzyna
 
Getting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdf
Getting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdfGetting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdf
Getting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdfssuser348b1c
 
OW2con'16 Keynote address: Kubernetes, the rising tide of systems administrat...
OW2con'16 Keynote address: Kubernetes, the rising tide of systems administrat...OW2con'16 Keynote address: Kubernetes, the rising tide of systems administrat...
OW2con'16 Keynote address: Kubernetes, the rising tide of systems administrat...OW2
 
Free GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOpsFree GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOpsWeaveworks
 
Intro to Kubernetes & GitOps Workshop
Intro to Kubernetes & GitOps WorkshopIntro to Kubernetes & GitOps Workshop
Intro to Kubernetes & GitOps WorkshopWeaveworks
 
Kubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slidesKubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slidesWeaveworks
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersinovex GmbH
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsSandeep Parikh
 
Overview of kubernetes network functions
Overview of kubernetes network functionsOverview of kubernetes network functions
Overview of kubernetes network functionsHungWei Chiu
 
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremTo Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremCloudOps2005
 
Getting started with kubernetes
Getting started with kubernetesGetting started with kubernetes
Getting started with kubernetesBob Killen
 
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsDevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsAmbassador Labs
 
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companionPGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companionPGConf APAC
 
Patroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companionPatroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companionAlexander Kukushkin
 
Webinar- Tea for the Tillerman
Webinar- Tea for the TillermanWebinar- Tea for the Tillerman
Webinar- Tea for the TillermanCumulus Networks
 
Kubernetes Networking - Giragadurai Vallirajan
Kubernetes Networking - Giragadurai VallirajanKubernetes Networking - Giragadurai Vallirajan
Kubernetes Networking - Giragadurai VallirajanNeependra Khare
 
Pydata 2020 containers meetup
Pydata  2020 containers meetup Pydata  2020 containers meetup
Pydata 2020 containers meetup Walid Shaari
 
How to Train Your Docker Cloud
How to Train Your Docker CloudHow to Train Your Docker Cloud
How to Train Your Docker CloudC4Media
 

Similar a Container Camp London (2016-09-09) (20)

K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
reBuy on Kubernetes
reBuy on KubernetesreBuy on Kubernetes
reBuy on Kubernetes
 
Getting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdf
Getting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdfGetting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdf
Getting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdf
 
OW2con'16 Keynote address: Kubernetes, the rising tide of systems administrat...
OW2con'16 Keynote address: Kubernetes, the rising tide of systems administrat...OW2con'16 Keynote address: Kubernetes, the rising tide of systems administrat...
OW2con'16 Keynote address: Kubernetes, the rising tide of systems administrat...
 
Free GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOpsFree GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOps
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Intro to Kubernetes & GitOps Workshop
Intro to Kubernetes & GitOps WorkshopIntro to Kubernetes & GitOps Workshop
Intro to Kubernetes & GitOps Workshop
 
Kubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slidesKubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slides
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containers
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid Deployments
 
Overview of kubernetes network functions
Overview of kubernetes network functionsOverview of kubernetes network functions
Overview of kubernetes network functions
 
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremTo Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
 
Getting started with kubernetes
Getting started with kubernetesGetting started with kubernetes
Getting started with kubernetes
 
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsDevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
 
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companionPGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
 
Patroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companionPatroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companion
 
Webinar- Tea for the Tillerman
Webinar- Tea for the TillermanWebinar- Tea for the Tillerman
Webinar- Tea for the Tillerman
 
Kubernetes Networking - Giragadurai Vallirajan
Kubernetes Networking - Giragadurai VallirajanKubernetes Networking - Giragadurai Vallirajan
Kubernetes Networking - Giragadurai Vallirajan
 
Pydata 2020 containers meetup
Pydata  2020 containers meetup Pydata  2020 containers meetup
Pydata 2020 containers meetup
 
How to Train Your Docker Cloud
How to Train Your Docker CloudHow to Train Your Docker Cloud
How to Train Your Docker Cloud
 

Último

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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 interpreternaman860154
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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 textsMaria Levchenko
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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 RobisonAnna Loughnan Colquhoun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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 MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
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...Martijn de Jong
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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 AutomationSafe Software
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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 MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Container Camp London (2016-09-09)

  • 1. Kubernetes, beyond the core Craig Box @craigbox
  • 2. Container Camp London // @craigboxGoogle Cloud Platform 2
  • 4. Container Camp London // @craigboxGoogle Cloud Platform 4 ● Lightweight ● Hermetically sealed ● Isolated ● Easily deployable ● Introspectable ● Runnable Containers: a quick recap i'm boring core infrastructure! Linux processes ● Improves overall developer experience ● Fosters code and component reuse ● Simplifies operations for cloud native applications
  • 5. Container Camp London // @craigboxGoogle Cloud Platform 5 ● Scheduling: Decide where my containers should run ● Lifecycle and health: Keep my containers running despite failures ● Scaling: Make sets of containers bigger or smaller ● Naming and discovery: Find where my containers are now ● Load balancing: Distribute traffic across a set of containers ● Storage volumes: Provide data to containers ● Logging and monitoring: Track what’s happening with my containers ● Debugging and introspection: Enter or attach to containers ● Identity and authorization: Control who can do things to my containers Kubernetes: a quick recap
  • 6. Container Camp London // @craigboxGoogle Cloud Platform 6 ● Kubernetes is one of the three legs of Cloud Native ○ Takes in container packaged apps ○ Emits microservices architectures ● Announced June 2014, in GA since June 2015 ● 1.4 is due out in 1 week! ● Under half the code is now written by Google ● Stewarded by the Cloud Native Compute Foundation™ ○ A Linux Foundation Collaborative Project™ Kubernetes: a quick recap
  • 7. Container Camp London // @craigboxGoogle Cloud Platform 7 Kubernetes is stable ● Concrete ideas from 10 years of production experience ○ and mistakes! ● v1 API; breaking changes held until v2 ● Alpha, Beta and GA tracks for new features ● Thorough end-to-end testing ● New work taking place outside of core ○ Volume & network plugins ○ Custom controllers ○ ThirdPartyResources
  • 8. Container Camp London // @craigboxGoogle Cloud Platform 8 Kubernetes has a solid core ● Core primitives: ○ pods, services, volumes, labels, controllers, etc ● Continual improvement using these basic concepts ○ Ingress: connect a load balancer to a Service ○ ReplicaSet: fungible replicas ○ DaemonSet: put a pod on every node ○ Job: batch workloads ○ ScheduledJob: run a Job at a certain time (cron)
  • 9. Container Camp London // @craigboxGoogle Cloud Platform 9 Kubernetes has a healthy ecosystem Some examples: ● Cloud providers: Azure, VMware, Openstack, Rackspace, CenturyLink ● Distros: CoreOS Tectonic, Mirantis Murano (OpenStack), RedHat Atomic, Hyper.sh, VMTurbo ● PaaS: RedHat OpenShift, Deis, Rancher, WSO2, Gondor/Kel, Apcera ● CD: Fabric8, Shippable, CloudBees, Solano ● Deployment: Kumoru, Redspread, Spinnaker ● Package managers: Helm, KPM ● Monitoring: Prometheus, Sysdig, Datadog ● Networking: Weaveworks, Tigera, OpenContrail ● Storage: NetApp, ClusterHQ ● Appliances: Redapt, Diamante
  • 10. Container Camp London // @craigboxGoogle Cloud Platform 10 Kubernetes has great momentum
  • 11. To host a similar set of services on our older Openstack environment would require at least 2-3x the number of servers. The cost savings isn't even the best part. Kubernetes has allowed us to build a completely self-service pipeline for our devs and has taken the ops team out of day-to-day app management. The nodes update themselves with the latest OS and Kube shifts the workload around as they do. This infrastructure is faster, more nimble, more cost-effective and so much easier to run. This is the best infrastructure I've ever used in twenty years of doing ops and leading ops teams.
  • 12. Since we started using kubernetes, we reduced our bill to 30% of its original price, and it made everything easier and scalable just as if we were using the costly [alternative]
  • 13. Your cluster turnup story is bad, and you should feel bad awwwwwwkward
  • 14. laptop$ kubeadm --help kubeadm: bootstrap a secure Kubernetes cluster easily. /========================================================== | KUBEADM IS ALPHA, DO NOT USE IT FOR PRODUCTION CLUSTERS! | | | | But, please try it out! Give us feedback at: | | https://github.com/kubernetes/kubernetes/issues | | and at-mention @kubernetes/sig-cluster-lifecycle | ==========================================================/ Example usage: Create a two-machine cluster with one master (which controls the cluster), and one node (where workloads, like pods and containers run). On the first machine ==================== master# kubeadm init master Your token is: <token> On the second machine ===================== node# kubeadm join node --token=<token> <ip-of-master>
  • 16. Container Camp London // @craigboxGoogle Cloud Platform 16 The problems to be solved 1. Preserve individual identity for fungible entities 2. Provide predictable ordering and control as those entities change 3. To enable the software entities to identify and recognize the other entities by those identities 4. To get access to a consistent storage mechanism (because their identity also corresponds to data)
  • 17. Container Camp London // @craigboxGoogle Cloud Platform 17 I apologise in advance for this horrible metaphor
  • 18. Container Camp London // @craigboxGoogle Cloud Platform 18 Pets vs Cattle It's so horrible it can only be written in Comic Sans
  • 21. Sometimes cattle are just plain adorable
  • 23. Container Camp London // @craigboxGoogle Cloud Platform 23 It's not just the "pet" part
  • 24.
  • 25. Container Camp London // @craigboxGoogle Cloud Platform 25 Naming things is hard
  • 26.
  • 27. Container Camp London // @craigboxGoogle Cloud Platform 27 (In fairness, I can tell you the UDP joke, but I can't guarantee you will get it)
  • 28. Container Camp London // @craigboxGoogle Cloud Platform 28 What is a pet? A Pet Set ensures that a specified number of “pets” with unique identities are running at any given time. The identity of a Pet is comprised of: ● a stable hostname, available in DNS ● an ordinal index ● stable storage: linked to the ordinal & hostname
  • 29. Container Camp London // @craigboxGoogle Cloud Platform 29 you're awesomethree please ReplicaSets Master
  • 30. Container Camp London // @craigboxGoogle Cloud Platform 30 you're awesome ReplicaSets web-7ci7o web-kzszj web-qqcnn Master
  • 31. Container Camp London // @craigboxGoogle Cloud Platform 31 bleep, bloopsix please ReplicaSets web-7ci7o web-kzszj web-qqcnn Master
  • 32. Container Camp London // @craigboxGoogle Cloud Platform 32 bleep, bloop ReplicaSets web-7ci7o web-kzszj web-qqcnn Master web-khku8 web-nacti web-z9gth
  • 33. Container Camp London // @craigboxGoogle Cloud Platform 33 ReplicaSets web-7ci7o web-kzszj web-qqcnn Master web-khku8 web-nacti web-z9gth at least i'm not passing the butter lol jk, 2 is plenty
  • 34. Container Camp London // @craigboxGoogle Cloud Platform 34 ReplicaSets web-7ci7o Master web-z9gth at least i'm not passing the butter
  • 35. Container Camp London // @craigboxGoogle Cloud Platform 35 you're awesome three please, with storage PetSets Master
  • 36. Container Camp London // @craigboxGoogle Cloud Platform 36 you're awesome three please, with storage PetSets db-0 Master pvc-db-0pv-db-0 1:1 mapping
  • 37. Container Camp London // @craigboxGoogle Cloud Platform 37 you're awesome three please, with storage PetSets db-0 db-1 Master pvc-db-0 pvc-db-1 pv-db-0 pv-db-1 1:1 mapping
  • 38. Container Camp London // @craigboxGoogle Cloud Platform 38 you're awesome PetSets db-0 db-1 db-2 Master pvc-db-0 pvc-db-1 pvc-db-2 pv-db-0 pv-db-1 pv-db-2 1:1 mapping
  • 39. Container Camp London // @craigboxGoogle Cloud Platform 39 no robots shall touch my pets PetSets db-0 db-1 db-2 Master pvc-db-0 pvc-db-1 pvc-db-2 pv-db-0 pv-db-1 pv-db-2 scale down to 2, please
  • 40. Container Camp London // @craigboxGoogle Cloud Platform 40 no robots shall touch my pets PetSets db-0 db-1 Master pvc-db-0 pvc-db-1 pvc-db-2 pv-db-0 pv-db-1 I might come in useful some day
  • 41. Container Camp London // @craigboxGoogle Cloud Platform 41 What other problems do I have? ● Discovery of peers for quorum ○ Sidecars and peer finder scripts ● Startup/teardown ordering ○ Init containers ○ Implicit ordering
  • 42. Container Camp London // @craigboxGoogle Cloud Platform 42 InitContainers db-0 Mount some things
  • 43. Container Camp London // @craigboxGoogle Cloud Platform 43 InitContainers db-0 Mount some things pv-db-0
  • 44. Container Camp London // @craigboxGoogle Cloud Platform 44 InitContainers db-0 Copy some stuff pv-db-0
  • 45. Container Camp London // @craigboxGoogle Cloud Platform 45 InitContainers db-0 Write some configs pv-db-0 DNS
  • 46. Container Camp London // @craigboxGoogle Cloud Platform 46 InitContainers db-0 Be a database pv-db-0
  • 47. Container Camp London // @craigboxGoogle Cloud Platform 47 ● InitContainers and PetSet introduced in 1.3 ● InitContainers are Beta in 1.4 ● PetSet remain in Alpha "The real P0 beta blocker is solid prototypes that increase our confidence in the core feature set." https://github.com/kubernetes/charts/tree/master/incubator Status: Alpha Thanks to Christian and Matt from
  • 48. Moving beyond the cluster
  • 49. Container Camp London // @craigboxGoogle Cloud Platform 49 Some terminology ● What is a cluster? ○ A bunch of machines on a high-speed network ● What is high-speed? ○ Generally "in the same building" ○ Same latency and throughput between any two machines ● How much is a bunch? ○ Enough to get the benefits of packing ○ Not too many to Accidentally Kill Everything
  • 50. Container Camp London // @craigboxGoogle Cloud Platform 50 shared cell (original) shared cell (compacted) non-prod load (compacted) prod-only load (compacted) # machines 25% overhead The bigger the bin, the better the packing
  • 51. Container Camp London // @craigboxGoogle Cloud Platform 51 How to separate ● Within a cluster ○ Use namespaces ● Within a region ○ Use NodePools to create "regional" cluster ● With multiple regions ○ Use cluster federation
  • 52. Container Camp London // @craigboxGoogle Cloud Platform 52 etcd scheduler controllers apiserver Users Master Nodes kubelet kubelet kubelet CLI UI API Single Kubernetes cluster
  • 53. Container Camp London // @craigboxGoogle Cloud Platform 53 Container Cluster All you care about API
  • 54. Container Camp London // @craigboxGoogle Cloud Platform 54 kubelet Control Plane Users Control Plane Clusters Federation APICLI UI API
  • 55. Container Camp London // @craigboxGoogle Cloud Platform 55 Cluster 2 us-central1-b Cluster 1 us-east1-b Cluster 3 europe-west1-b Cluster 4 asia-east1-b API CLI UI Create the clusters API API API API
  • 56. Container Camp London // @craigboxGoogle Cloud Platform 56 Federation consists of ● Namespace ● API Server Service with public VIP ● API Server Deployment with 2 replicas ● Controller Manager Pod with 1 replica ● Database key/value store Familiar? --context=federation-cluster Deploy the Federated Control Plane Cluster 2 us-central1-b Cluster 1 us-east1-b Cluster 3 europe-west1-b Cluster 4 asia-east1-b API API API API
  • 57. Container Camp London // @craigboxGoogle Cloud Platform 57 Add clusters to federation Cluster 2 us-central1-b Cluster 1 us-east1-b Cluster 3 europe-west1-b Cluster 4 asia-east1-b API API API API Federation Control Plane kubectl --context=federation-cluster create -f clusters/gce-asia-east1.yaml apiVersion: federation/v1beta1 kind: Cluster metadata: name: gce-asia-east1 spec: serverAddressByClientCIDRs: - clientCIDR: "0.0.0.0/0" serverAddress: "https://257.100.194.68" secretRef: name: gce-asia-east1
  • 58. Container Camp London // @craigboxGoogle Cloud Platform 58 Deploy a federated ReplicaSet Cluster 2 us-central1-b Cluster 1 us-east1-b Cluster 3 europe-west1-b Cluster 4 asia-east1-b API API API API Federation Control Plane kubectl --context=federation-cluster create -f rs/nginx.yaml apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: name: nginx spec: replicas: 4 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.10 me again
  • 59. Container Camp London // @craigboxGoogle Cloud Platform 59 Deploy a federated Service Cluster 2 us-central1-b Cluster 1 us-east1-b Cluster 3 europe-west1-b Cluster 4 asia-east1-b API API API API Federation Control Plane kubectl --context=federation-cluster create -f service/nginx.yaml apiVersion: v1 kind: Service metadata: labels: app: nginx name: nginx spec: ports: - port: 80 protocol: TCP targetPort: 80 name: http selector: app: nginx type: LoadBalancer
  • 60. Container Camp London // @craigboxGoogle Cloud Platform 60 Each service shard gets a load balancer Cluster 1 us-east1-b Cluster 2 us-central1-b Cluster 3 europe-west1-b Cluster 4 asia-east1-b
  • 61. Container Camp London // @craigboxGoogle Cloud Platform 61 ...and each service creates a DNS entry
  • 62. Container Camp London // @craigboxGoogle Cloud Platform 62 Cross-cluster service discovery Cluster 1 us-east1-b Cluster 2 us-central1-b Cluster 3 europe-west1-b Cluster 4 asia-east1-b nslookup nginx.default.federation.svc.federation.com
  • 63. Container Camp London // @craigboxGoogle Cloud Platform 63 Cross-cluster service discovery Cluster 1 us-east1-b Cluster 2 us-central1-b Cluster 3 europe-west1-b Cluster 4 asia-east1-b nslookup nginx.default.federation.svc.federation.com DNS Clusters 3 and 4
  • 64. Container Camp London // @craigboxGoogle Cloud Platform 64 Cross-cluster service discovery Cluster 1 us-east1-b Cluster 2 us-central1-b Cluster 3 europe-west1-b Cluster 4 asia-east1-b
  • 65. Container Camp London // @craigboxGoogle Cloud Platform 65 Cross-cluster service discovery Cluster 1 us-east1-b Cluster 2 us-central1-b Cluster 3 europe-west1-b Cluster 4 asia-east1-b
  • 66. Container Camp London // @craigboxGoogle Cloud Platform 66 Cross-cluster service discovery Cluster 1 us-east1-b Cluster 2 us-central1-b Cluster 4 asia-east1-b
  • 67. Container Camp London // @craigboxGoogle Cloud Platform 67 Cross-cluster service discovery Cluster 1 us-east1-b Cluster 2 us-central1-b Cluster 4 asia-east1-b
  • 68. Container Camp London // @craigboxGoogle Cloud Platform 68 Cross-cluster service discovery Cluster 1 us-east1-b Cluster 2 us-central1-b Cluster 4 asia-east1-b
  • 69. Container Camp London // @craigboxGoogle Cloud Platform 69 Stop the presses: Federated Ingress Cluster 1 us-east1-b Cluster 2 us-central1-b Cluster 3 europe-west1-b Cluster 4 asia-east1-b Google's Magic Global Load Balancer
  • 70. Container Camp London // @craigboxGoogle Cloud Platform 70 Q2 2016 Q3 2016 Q4 2016 (**) 2017 and beyond (**) Beta 1 ● Public facing, multi-region/Cloud, cross-cluster service discovery (internal/external DNS) ● Service object API support Beta 2 ● Replica Sets ● Multi-region Ingress (L7) Load Balancing across clusters for GCP only Beta 3 ● Cross-provider, multi-region Ingress (L7) Load Balancing ● GKE IAM Integration GA! ● Non-public-facing cross-cluster service discovery ● Full support for Kubernetes API objects ● UI support for Federated Clusters ● Federated IAM ● GKE hosted control plane (**) - this is a proposed roadmap. Items listed here are subject to change. Status: Beta
  • 71. Container Camp London // @craigboxGoogle Cloud Platform 71 ● Kubernetes Cluster Federation Sneak Peak ● Kubernetes Cluster Federation using GKE ● Cluster Federation Admin Guide ● Cross Cluster Service Discovery Deployment Guide ● Cross Cluster Services - Achieving Higher Availability for your Kubernetes Applications Also, ● Participate with us on the Kubernetes #sig-federation ● Post issues or feature requests on GitHub ● Join us in the #federation channel on Slack Want to learn more?
  • 73. Container Camp London // @craigboxGoogle Cloud Platform 73 1.4 is coming soon! ● Use Swagger 2.0, enabled non-go clients ● StorageClass ● AppArmor Support ● PodSecurityPolicy ● New Volume Plugins: Quobyte and Azure Data Disk ● Dashboard UI ● ScheduledJobs ● InitContainers ● Workloads installable with 1 command ● GCI as default Node Image ● GKE: Curated IAM Roles ● GKE: Alpha Clusters ● GKE: Available in Oregon (and soon in Japan) ● Federate all the things: ○ Ingress for GCP ○ Namespaces ○ Services ○ Secrets ○ ReplicaSets ● Federation Events ● PodDisruptionBudget ● Ingress for Multizone Clusters ● Prioritized Scheduling of Cluster Add-ons ● Container Image Policy ● Workload spreading across failure domains ● Kubelet TLS Bootstrap ● External Source IP Preservation ● Audit Logging