Date post: | 19-Jan-2017 |
Category: |
Engineering |
Upload: | carter-morgan |
View: | 120 times |
Download: | 2 times |
The AppHow do I write scalable apps?
How do I package and distribute?
What runtimes am I locked into?
@_askcarter
Kubernetes
Open Source Container Automation Framework
• Open API
• Based on Google’s experiences
@_askcarter
Kubernetes Pre 1.3
Horizontal ScalingAutomated RollbacksContainer SchedulingResource Quotas and LimitsSelf-healingService Discovery and Load BalancingSecret and Configuration ManagementDaemon SetsSecrets and Config MapsDeployments
(already had a lot)
@_askcarter
PodsLogical Application• One or more containers
and volumes• Shared namespaces• One IP per pod Pod
nginx
monolith
NFSiSCSIGCE
10.1.0.100
@_askcarter
LabelsArbitrary metadata attached to any API object• Queryable by Selectors• How Kubernetes does
groupingPod
nginx
monolith
Pod
nginx
monolith
labels: version: v1 track: stable
labels: version: v1 track: test
@_askcarter
Labels
selector: version=v1Pod
nginx
monolith
Pod
nginx
monolith
labels: version: v1 track: stable
labels: version: v1 track: test
@_askcarter
Labels
selector: track=stablePod
nginx
monolith
Pod
nginx
monolith
labels: version: v1 track: stable
labels: version: v1 track: test
@_askcarter
ServicesPersistent IPs for Pods• Uses Labels to
Target Pods• Internal or External IPs
Pod
nginx
monolith
Pod
nginx
monolith
Service10.8.244.100
10.1.0.210.1.0.1
@_askcarter
DeploymentsDrive current state towards desired state
Node 1
Pod
app: hello replicas: 1
hello
Node 2
@_askcarter
DeploymentsDrive current state towards desired state
Node 1
Pod
app: hello replicas: 2
hello
Node 2
Podhello
@_askcarter
DeploymentsDrive current state towards desired state
Node 1
Pod
app: hello replicas: 2
hello
Node 2
@_askcarter
DeploymentsDrive current state towards desired state
Node 1
Pod
app: hello replicas: 2
hello
Node 2
Podhello
@_askcarter
Rolling Update
Node 1
Podhello
Podhello
Node
Podhello
Node
Podhello
Node
Podhello
Service
@_askcarter
Rolling Update
Node 1
Podhello
Podhello
Node
Podhello
Node
Podhello
Node
Podhello
Service
Podgoodbye
@_askcarter
Rolling Update
Node 1
Podhello
Podhello
Node
Podhello
Node
Podhello
Node
Podhello
Service
Podgoodbye
@_askcarter
Rolling Update
Node 1
Podhello
Podhello
Node
Podhello
Node
Podhello
Node
Podhello
Service
Podgoodbye
@_askcarter
Rolling Update
Node 1
Podhello
Podhello
Node
Podhello
NodeNode
Podhello
Service
Podgoodbye
Podgoodbye
@_askcarter
Rolling Update
Node 1
Podhello
Podhello
Node
Podhello
NodeNode
Podhello
Service
Podgoodbye
Podgoodbye
@_askcarter
Rolling Update
Node 1
Podhello
Podhello
Node
Podhello
NodeNode
Podhello
Service
Podgoodbye
Podgoodbye
@_askcarter
Rolling Update
Node 1
Podhello
Podhello
Node
Podhello
NodeNode
Service
Podgoodbye
Podgoodbye
@_askcarter
Rolling Update
Node 1
Podhello
Podhello
Node
Podhello
NodeNode
Service
Podgoodbye
Podgoodbye
Podgoodbye
@_askcarter
Rolling Update
Node 1
Podhello
Podhello
Node
Podhello
NodeNode
Service
Podgoodbye
Podgoodbye
Podgoodbye
@_askcarter
Rolling Update
Node 1
Podhello
Podhello
Node
Podhello
NodeNode
Service
Podgoodbye
Podgoodbye
Podgoodbye
@_askcarter
Rolling Update
Node 1
Podhello
Podhello
Node NodeNode
Service
Podgoodbye
Podgoodbye
Podgoodbye
@_askcarter
Kubernetes 1.3
Init containers (alpha)Fixed PDsCluster Federation (alpha)Optional HTTP2Pod Level QoS PolicyTls secretskubectl set commandUIJobsRBAC (alpha, experimental)Garbage Collector (alpha)Pet Setsrkt Container runtimeNetwork policies(and more)
@_askcarter
JobsPods *expected* to terminate
Creates 1...n Pods and ensures that a certain number of them run to completion
3 types: non-parallel, fixed count parallel, and parallel with a work queue
@_askcarter
Init ContainersSequential Pod Initialization
@_askcarter
Pod
Init 1
monolith
NFS
10.1.0.100
Init 2 Init 3
Pet SetsPods with ego
Pods are fungible, stateless?
Pets are Pods with:
1. Stable hostname2. A unique name3. Stable storage
@_askcarter
Google Container
Engine(GKE)
Cluster autoscaling (beta)IAM supportLocal SSDContainer-VM Images (beta)Node pools
@_askcarter
Kubernetes 1.3Planet Scale - SLA 2000 nodes
Never Outgrow - minikube to prod
Run Anywhere - Cluster Federation
@_askcarter