![Page 1: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/1.jpg)
KubernetesWhere we are, where we’re going and why
Brendan BurnsSenior Staff Software Engineer
![Page 2: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/2.jpg)
Where are we?
![Page 3: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/3.jpg)
Where are you?
![Page 4: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/4.jpg)
Where are we going?
![Page 5: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/5.jpg)
Where are we going?
We’re making reliable, scalable, agile distributed systems a CS101 exercise
![Page 6: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/6.jpg)
Scaling Kubernetes to 1M QPS
![Page 7: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/7.jpg)
Building a demo to 1M QPS
nginx-service10.0.0.3
Loadbot Replication Controller
![Page 8: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/8.jpg)
Building a demo to 1M QPS
nginx-service10.0.0.3
Kubernetes API Server
Data Aggregator
pods whereapp=loadboat
data-service10.0.0.4
Demo GUI
![Page 9: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/9.jpg)
The road ahead
1
2
3
Kubernetes 1.1
Looking ahead to Kubernetes 1.2
Flags in the distance
![Page 10: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/10.jpg)
Kubernetes 1.1
Autoscaling BatchJobs
HTTP Load Balancing
Resource Overcommit
IP Tables Kube Proxy
Newkubectl tools
1M QPS, 1000+ nodes* and much more!
![Page 11: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/11.jpg)
Kubernetes 1.1
Autoscaling 1M QPS1k+ Nodes
HTTP Load Balancing
Resource Overcommit
IP Tables Kube Proxy
Newkubectl 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]
![Page 12: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/12.jpg)
Ingress for HTTP Load Balancing [Beta]
Service-foo: 24.1.2.3 Service-bar: 24.4.5.6
![Page 13: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/13.jpg)
Ingress for HTTP Load Balancing
Service-foo: 10.0.0.1 Service-bar 10.0.0.2
api.company.com24.7.8.9
http://api.company.com/foo http://api.company.com/bar
![Page 14: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/14.jpg)
Ingress for HTTP Load Balancing
Service-foo: 10.0.0.1 Service-bar 10.0.0.2
api.company.com24.7.8.9
http://api.company.com/foo http://api.company.com/bar
Ingress API
![Page 15: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/15.jpg)
Ingress API
apiVersion: extensions/v1beta1kind: Ingressmetadata: name: testspec: 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
![Page 16: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/16.jpg)
Ingress API
apiVersion: extensions/v1beta1kind: Ingressmetadata: name: testspec: 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/*
![Page 17: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/17.jpg)
Implementing Ingress
Ingress Object Ingress Controller● GCE● HAProxy*● ...
![Page 18: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/18.jpg)
Horizontal Pod Autoscaling [Beta]
Service-foo: 10.0.0.1
api.company.com24.7.8.9
http://api.company.com/foo
![Page 19: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/19.jpg)
Horizontal Pod Autoscaling [Beta]
Service-foo: 10.0.0.1
api.company.com24.7.8.9
http://api.company.com/foo
https://www.flickr.com/photos/davedehetre/4440211085
![Page 20: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/20.jpg)
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
![Page 21: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/21.jpg)
But why is it called “Horizontal”?
![Page 22: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/22.jpg)
But why is it called “Horizontal”?
![Page 23: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/23.jpg)
But why is it called “Horizontal”?
![Page 24: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/24.jpg)
Jobs [Beta]
Service-foo: 10.0.0.1
api.company.com24.7.8.9
http://api.company.com/foo
![Page 25: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/25.jpg)
Jobs
Service-foo: 10.0.0.1
api.company.com24.7.8.9
http://api.company.com/foo Start Finish
![Page 26: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/26.jpg)
Jobs
Start Finish
apiVersion: extensions/v1beta1kind: Jobmetadata: name: ffmpegspec: selector: matchLabels: app: ffmpeg template: metadata: labels: app: ffmpeg spec: containers: - name: ffmpeg image: ffmpeg restartPolicy: OnFailure
![Page 27: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/27.jpg)
Jobs
Start Finish
apiVersion: extensions/v1beta1kind: Jobmetadata: name: ffmpegspec: selector: matchLabels: app: ffmpeg # run 5 times before done completions: 5
...
![Page 28: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/28.jpg)
Jobs
Start Finish
apiVersion: extensions/v1beta1kind: Jobmetadata: name: ffmpegspec: selector: matchLabels: app: ffmpeg # run 5 times before done completions: 5 parallelism: 2...
![Page 29: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/29.jpg)
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...
![Page 30: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/30.jpg)
New APIs: HTTP Load Balancing with Ingress
fooSvc barSvc
http://k8s.io/foo http://k8s.io/bar
![Page 31: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/31.jpg)
New APIs: Horizontal Pod AutoScaling
![Page 32: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/32.jpg)
New APIs: Jobs
Start Finish
![Page 33: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/33.jpg)
But that’s not all...
Autoscaling BatchJobs
HTTP Load Balancing
Resource Overcommit
IP Tables Kube Proxy
Newkubectl tools
1M QPS, 1000+ nodes* and much more!
![Page 34: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/34.jpg)
Memory Overcommit
Guaranteed
Burstable
Best Effort
![Page 35: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/35.jpg)
Memory Overcommit
Resource Class Request Limit
Best Guaranteed 10G 10G
Better Burstable 5G 10G
Good Best Effort - 10G
![Page 36: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/36.jpg)
IPTables Proxy
![Page 37: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/37.jpg)
kubectl improvements
kubectl run -i --tty shell --image=busybox -- sh
kubectl attach -i --tty my-pod
kubectl edit pods my-pod
kubectl apply ...
![Page 38: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/38.jpg)
Rolling update improvements
![Page 39: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/39.jpg)
Rolling update improvements
![Page 40: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/40.jpg)
Rolling update improvements
![Page 41: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/41.jpg)
The road ahead
1
2
3
An overview of Kubernetes 1.1
Looking ahead to Kubernetes 1.2
Flags in the distance
![Page 42: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/42.jpg)
Why are we all here?
It’s not to run N nodes or M containersFrankly, it’s not even to run containersIt’s to build applicationsIt’s to operate applicationsIt’s to update applications
And to do it all easily.
![Page 43: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/43.jpg)
Envisioning distributed systems as applications
type LeaderFn func(isLeader bool, leaderName string)
type LeaderElector interface {InstallLeaderFunc(leaderFn LeaderFn)Run()
}
![Page 44: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/44.jpg)
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 leader\n", leaderName)}
}
![Page 45: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/45.jpg)
Envisioning distributed systems as applications
package main
func leaderFn(leader bool, leaderName string) { … }
func main() {elector := impl.NewLeaderElector()elector.InstallLeaderFunc(leaderFn)elector.Run()
}
![Page 46: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/46.jpg)
Envisioning distributed systems as applications
myLeaderElector
./myLeaderElector --replicas=3 --daemon
![Page 47: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/47.jpg)
Envisioning distributed systems as applications
myLeaderElector
./myLeaderElector --replicas=3 --daemon
![Page 48: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/48.jpg)
Envisioning distributed systems as applications
myLeaderElector
./myLeaderElector --replicas=3 --daemon
myLeaderElector
etcd
myLeaderElector
etcd
myLeaderElector
etcd
![Page 49: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/49.jpg)
Envisioning distributed systems as applications
myLeaderElector
./myLeaderElector --stop
myLeaderElector
etcd
myLeaderElector
etcd
myLeaderElector
etcd
![Page 50: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/50.jpg)
Envisioning distributed systems as applications
myLeaderElector
./myLeaderElector --stop
![Page 51: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/51.jpg)
The road ahead
1
2
3
An overview of Kubernetes 1.1
Looking ahead to Kubernetes 1.2
Flags in the distance
![Page 52: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/52.jpg)
Looking forward to Kubernetes 1.2 : Pre-built applications
Google Deployment Manager is Open Sourced!https://github.com/kubernetes/deployment-manager
Deis announces Helmhttps://github.com/deis/helm
And more to come...
backend10.0.0.3
frontend24.1.2.3
![Page 53: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/53.jpg)
Cluster-1
Looking forward to Kubernetes 1.2 : Cross cluster management
New Open Source UXhttps://github.com/kubernetes/dashboard
Cross cluster service import/export
TBD...
Cluster-2
Ubernetes
![Page 54: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/54.jpg)
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
![Page 55: Kubernetes: Where we are, where we’re going and why](https://reader030.vdocument.in/reader030/viewer/2022021500/58f1d78b1a28ab13758b45b1/html5/thumbnails/55.jpg)
Thank you!