what’s new in k8s 1files.meetup.com/18569714/what's new in k8s 1.3.pdf · automated...
TRANSCRIPT
What’s New in K8s 1.3
Carter Morgan@_askcarter
@_askcarter
Background: 3 Hurdles
@_askcarter
The AppHow do I write scalable apps?
How do I package and distribute?
What runtimes am I locked into?
@_askcarter
The InfraCan I scale?
Is it automatic?
Am I locked in?
@_askcarter
The Wild Where are my machines?
How do I update?
@_askcarter
Kubernetes
Open Source Container Automation Framework
• Open API
• Based on Google’s experiences
@_askcarter
3 Claims
@_askcarter
How does k8s hold up?
@_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
monolith
nginx
hello
nginx
Microservices
Monolith
auth
@_askcarter
Container BasedPhoto © ptnimages via Canva.com
@_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
3 Claims: revisited
@_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
Cluster Federation
Manage clusters across region and providers
@_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
Job: Work Queue with Pod Per Work Item
@_askcarter
Init ContainersSequential Pod Initialization
@_askcarter
Pod
Init 1
monolith
NFS
10.1.0.100
Init 2 Init 3
Init Container: register pod to external service
@_askcarter
Init Container: clone a git repo into a volume
@_askcarter
Pet SetsPods with ego
Pods are fungible, stateless?
Pets are Pods with:
1. Stable hostname2. A unique name3. Stable storage
@_askcarter
PetSet: example manifest
@_askcarter
PetSet: headless service
@_askcarter
Bonus
@_askcarter
Google Container
Engine(GKE)
Cluster autoscaling (beta)IAM supportLocal SSDContainer-VM Images (beta)Node pools
@_askcarter
minikube github.com/kubernetes/minikube
@_askcarter
Kube UIkubernetes.io/docs/user-guide/ui/
(demo)
@_askcarter
Thing I learned(making this talk)
kubectl explain deployment.spec.minReadySeconds
@_askcarter
Recap
@_askcarter
3 HurdlesThe App
The Infra
The Wild
@_askcarter
3 ClaimsPlanet Scale
Never Outgrow
Run Anywhere
@_askcarter
Kubernetes 1.3Planet Scale -
Never Outgrow - minikube to prod
Run Anywhere - Cluster Federation
@_askcarter
Carter Morgan@_askcarter
Watch blog.kubernetes.io for the big release!
@_askcarter