SlideShare a Scribd company logo
1 of 55
Download to read offline
Kubernetes
Where we are, where we’re going and why
Brendan Burns
Senior Staff Software Engineer
Where are we?
Where are you?
Where are we going?
Where are we going?
We’re making reliable, scalable, agile
distributed systems a CS101 exercise
Scaling Kubernetes to 1M QPS
Building a demo to 1M QPS
nginx-service
10.0.0.3
Loadbot
Replication
Controller
Building a demo to 1M QPS
nginx-service
10.0.0.3
Kubernetes
API Server
Data Aggregator
pods where
app=loadboat
data-service
10.0.0.4
Demo GUI
The road ahead
1
2
3
Kubernetes 1.1
Looking ahead to Kubernetes 1.2
Flags in the distance
Kubernetes 1.1
Autoscaling
Batch
Jobs
HTTP Load
Balancing
Resource
Overcommit
IP Tables
Kube Proxy
New
kubectl
tools
1M QPS, 1000+ nodes* and much more!
Kubernetes 1.1
Autoscaling
1M QPS
1k+ Nodes
HTTP Load
Balancing
Resource
Overcommit
IP Tables
Kube Proxy
New
kubectl
tools
And much more!
Releasing today!
Rolling out to Google Container Engine this week
[new clusters]
Rolling out to existing Container Engine clusters in ~2 weeks
[send us a note if you want it earlier]
Ingress for HTTP Load Balancing [Beta]
Service-foo: 24.1.2.3 Service-bar: 24.4.5.6
Ingress for HTTP Load Balancing
Service-foo: 10.0.0.1 Service-bar 10.0.0.2
api.company.com
24.7.8.9
http://api.company.com/foo http://api.company.com/bar
Ingress for HTTP Load Balancing
Service-foo: 10.0.0.1 Service-bar 10.0.0.2
api.company.com
24.7.8.9
http://api.company.com/foo http://api.company.com/bar
Ingress API
Ingress API
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test
spec:
rules:
- host: k8s.io
http:
paths:
- path: /foo
backend:
serviceName: fooSvc
servicePort: 80
- path: /bar
backend:
serviceName: barSvc
servicePort: 80
fooSvc barSvc
http://k8s.io/foo http://k8s.io/bar
Ingress API
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test
spec:
rules:
- host: k8s.io
http:
paths:
- backend:
serviceName: k8sSvc
servicePort: 80
- host: j7a.io
http:
paths:
- backend:
serviceName: j7aSvc
servicePort: 80
k8sSvc j7aSvc
http://k8s.io/* http://j7a.io/*
Implementing Ingress
Ingress Object
Ingress Controller
● GCE
● HAProxy*
● ...
Horizontal Pod Autoscaling [Beta]
Service-foo: 10.0.0.1
api.company.com
24.7.8.9
http://api.company.com/foo
Horizontal Pod Autoscaling [Beta]
Service-foo: 10.0.0.1
api.company.com
24.7.8.9
http://api.company.com/foo
https://www.flickr.com/photos/davedehetre/4440211085
Horizontal Pod Autoscaling [Beta]
apiVersion: extensions/v1beta1
kind: HorizontalPodAutoscaler
metadata:
name: php-apache
spec:
scaleRef:
kind: ReplicationController
name: php-apache
namespace: default
minReplicas: 1
maxReplicas: 10
cpuUtilization:
targetPercentage: 50
https://www.flickr.com/photos/davedehetre/4440211085
But why is it called “Horizontal”?
But why is it called “Horizontal”?
But why is it called “Horizontal”?
Jobs [Beta]
Service-foo: 10.0.0.1
api.company.com
24.7.8.9
http://api.company.com/foo
Jobs
Service-foo: 10.0.0.1
api.company.com
24.7.8.9
http://api.company.com/foo Start Finish
Jobs
Start Finish
apiVersion: extensions/v1beta1
kind: Job
metadata:
name: ffmpeg
spec:
selector:
matchLabels:
app: ffmpeg
template:
metadata:
labels:
app: ffmpeg
spec:
containers:
- name: ffmpeg
image: ffmpeg
restartPolicy: OnFailure
Jobs
Start Finish
apiVersion: extensions/v1beta1
kind: Job
metadata:
name: ffmpeg
spec:
selector:
matchLabels:
app: ffmpeg
# run 5 times before done
completions: 5
...
Jobs
Start Finish
apiVersion: extensions/v1beta1
kind: Job
metadata:
name: ffmpeg
spec:
selector:
matchLabels:
app: ffmpeg
# run 5 times before done
completions: 5
parallelism: 2
...
Jobs are a foundation
https://www.flickr.com/photos/dgoomany/4976873174 https://www.flickr.com/photos/kubina/278696130
Shard numbers, Scheduled Jobs, Workflow and more...
New APIs: HTTP Load Balancing with Ingress
fooSvc barSvc
http://k8s.io/foo http://k8s.io/bar
New APIs: Horizontal Pod AutoScaling
New APIs: Jobs
Start Finish
But that’s not all...
Autoscaling
Batch
Jobs
HTTP Load
Balancing
Resource
Overcommit
IP Tables
Kube Proxy
New
kubectl
tools
1M QPS, 1000+ nodes* and much more!
Memory Overcommit
Guaranteed
Burstable
Best Effort
Memory Overcommit
Resource Class Request Limit
Best Guaranteed 10G 10G
Better Burstable 5G 10G
Good Best Effort - 10G
IPTables Proxy
kubectl improvements
kubectl run -i --tty shell --image=busybox -- sh
kubectl attach -i --tty my-pod
kubectl edit pods my-pod
kubectl apply ...
Rolling update improvements
Rolling update improvements
Rolling update improvements
The road ahead
1
2
3
An overview of Kubernetes 1.1
Looking ahead to Kubernetes 1.2
Flags in the distance
Why are we all here?
It’s not to run N nodes or M containers
Frankly, it’s not even to run containers
It’s to build applications
It’s to operate applications
It’s to update applications
And to do it all easily.
Envisioning distributed systems as applications
type LeaderFn func(isLeader bool, leaderName string)
type LeaderElector interface {
InstallLeaderFunc(leaderFn LeaderFn)
Run()
}
Envisioning distributed systems as applications
func myLeaderFn(leader bool, leaderName string) {
if leader {
fmt.Println("I'm the leader")
} else {
fmt.Printf("%s is the leadern", leaderName)
}
}
Envisioning distributed systems as applications
package main
func leaderFn(leader bool, leaderName string) { … }
func main() {
elector := impl.NewLeaderElector()
elector.InstallLeaderFunc(leaderFn)
elector.Run()
}
Envisioning distributed systems as applications
myLeaderElector
./myLeaderElector --replicas=3 --daemon
Envisioning distributed systems as applications
myLeaderElector
./myLeaderElector --replicas=3 --daemon
Envisioning distributed systems as applications
myLeaderElector
./myLeaderElector --replicas=3 --daemon
myLeaderElector
etcd
myLeaderElector
etcd
myLeaderElector
etcd
Envisioning distributed systems as applications
myLeaderElector
./myLeaderElector --stop
myLeaderElector
etcd
myLeaderElector
etcd
myLeaderElector
etcd
Envisioning distributed systems as applications
myLeaderElector
./myLeaderElector --stop
The road ahead
1
2
3
An overview of Kubernetes 1.1
Looking ahead to Kubernetes 1.2
Flags in the distance
Looking forward to Kubernetes 1.2 : Pre-built applications
Google Deployment Manager is Open Sourced!
https://github.com/kubernetes/deployment-manager
Deis announces Helm
https://github.com/deis/helm
And more to come...
backend
10.0.0.3
frontend
24.1.2.3
Cluster-1
Looking forward to Kubernetes 1.2 : Cross cluster management
New Open Source UX
https://github.com/kubernetes/dashboard
Cross cluster service import/export
TBD...
Cluster-2
Ubernetes
Looking forward to Kubernetes 1.2 : Simplified Config
!! generator.kubernetes.io/java/v1
name: my-java-app
java: 7
jar: some/path/to/my.jar
replicas: 2
resources:
cpu: 1.0
memory: 10G
Thank you!

More Related Content

More from 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
 

More from KubeAcademy (20)

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: 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
 
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: 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...
 
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: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant KubernetesKubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant Kubernetes
 
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
 
KubeCon EU 2016: Full Automatic Database: PostgreSQL HA with Kubernetes
KubeCon EU 2016: Full Automatic Database: PostgreSQL HA with KubernetesKubeCon EU 2016: Full Automatic Database: PostgreSQL HA with Kubernetes
KubeCon EU 2016: Full Automatic Database: PostgreSQL HA with Kubernetes
 
KubeCon EU 2016: A lightweight deployment system for appops
KubeCon EU 2016: A lightweight deployment system for appopsKubeCon EU 2016: A lightweight deployment system for appops
KubeCon EU 2016: A lightweight deployment system for appops
 
KubeCon EU 2016: Scaling Open edX with Kubernetes
KubeCon EU 2016: Scaling Open edX with KubernetesKubeCon EU 2016: Scaling Open edX with Kubernetes
KubeCon EU 2016: Scaling Open edX with Kubernetes
 
KubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume PluginsKubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume Plugins
 

Recently uploaded

Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 

Kubernetes: Where we are, where we’re going and why