SlideShare a Scribd company logo
Introduction to Kubernetes
Mete Atamel
Developer Advocate for Google Cloud
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 2
Mete Atamel
Developer Advocate for Google Cloud Platform
@meteatamel
atamel@google.com
meteatamel.wordpress.com
@meteatamel
Who are you?
Agenda
The Monolith
What is the Monolith and why is it bad?
Breaking The Monolith into Microservices
Why Microservices is the way to go?
Problems with Microservices
Exchanging one set of problems with another?
Containers and Kubernetes
What are containers and Kubernetes, how do they help?
Kubernetes building blocks
Pods, services, replication controllers/set and more
@meteatamel
The Monolith
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 6
What is the Monolith?
@meteatamel
APP SERVER
Module 1 Module 2 Module 3
DB
Confidential & ProprietaryGoogle Cloud Platform 7
Problems with the Monolith
Unnecessary tight coupling among different modules
All at once, or none at all update policy
Hard to scale different parts independently
Ignores different development velocity of different teams completely
Hard to establish ownership of the whole system as it’s huge
Hard to debug and test in general, hard to run on a single development machine
@meteatamel
Breaking the Monolith into Microservices
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 9
The Monolith to Microservices
@meteatamel
Microservice1
DB1
Microservice2
DB2
Microservice3
DB3
Confidential & ProprietaryGoogle Cloud Platform 10
Problems with Microservices
Need to worry about multiple independent systems instead of one
Can be hard to debug and test across multiple services without proper logging
“But it works on my machine!” problem still applies
Common maintenance problems still apply: Redundancy, resilience, rolling
upgrades, rolling downgrades
@meteatamel
Containers and Kubernetes
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 12
Quick recap of Containers
@meteatamel
Lightweight
Hermetically sealed
Isolated
Easily deployable
Introspectable
Runnable
Linux processes
Improves overall developer experience
Fosters code and component reuse
Simplifies operations for cloud native applications
Docker
Confidential & ProprietaryGoogle Cloud Platform 13
Everything at Google runs on containers
Gmail, Web Search, Maps, ...
MapReduce, batch, ...
GFS, Colossus, ...
Google’s Cloud Platform: VMs run in containers!
We launch over 2 billion containers per week
Confidential & ProprietaryGoogle Cloud Platform 14
Containers are great but not enough
Containers help to create a lightweight and consistent environment for apps
But it does not solve common app management problems:
● Deploy your a new version of your app reliably
● Create resiliency
● Scale up and down
● Rollback a deployment
● Health checks
● Graceful shutdown
● Etc. etc. etc.
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 15
Kubernetes comes to rescue
http://kubernetes.io
Open source container management platform
Based on years of experience running Borg at Google
Runs everywhere: your laptop, on-prem, different cloud platforms
Helps with reliable deployment of apps, scaling, roll out and roll back of versions,
autoscaling, health checks and more!
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 16
Kubernetes Cluster
@meteatamel
K8s Master
API Server
Dash Board
scheduler
Kubelet Kubelet Kubelet Kubelet
Container
Registry
etcdControllers
web browsers
kubectl
web browsers
Config
file
Image
Confidential & ProprietaryGoogle Cloud Platform 17
Kubernetes Cluster
@meteatamel
K8s Master
API Server
Dash Board
scheduler
Kubelet Kubelet Kubelet Kubelet
etcdControllers
web browsers
kubectl
web browsers
Config
file
Image
Container
Registry
Confidential & ProprietaryGoogle Cloud Platform 18
Kubernetes Cluster on GKE
@meteatamel
Kubernetes Building Blocks
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 20
Pods
@meteatamel
The atom of scheduling for containers
Represents an application specific logical
host
Hosts containers and volumes
Each has its own routable (no NAT) IP
address
Ephemeral
• Pods are functionally identical and therefore
ephemeral and replaceable
Pod
Web Server
Volume
Consumers
Confidential & ProprietaryGoogle Cloud Platform 21
Pods
@meteatamel
Pod
Git
Synchronizer
Node.js App
Container
Volume
Consumersgit Repo
Can be used to group multiple containers &
shared volumes
Containers within a pod are tightly coupled
Shared namespaces
• Containers in a pod share IP, port and IPC
namespaces
• Containers in a pod talk to each other through
localhost
Confidential & ProprietaryGoogle Cloud Platform 22
Pods
@meteatamel
Pods have IPs which are routable
Pods can reach each other without NAT
Even across nodes
No Brokering of Port Numbers
These are fundamental requirements
Many solutions
GCE Advanced Routes, AWS Flannel,
Weave, OpenVSwitch, Cloud Provider
10.1.2.0/24
10.1.1.0/24
10.1.1.211 10.1.1.2
10.1.2.106
10.1.3.0/24
10.1.3.4510.1.3.17
10.1.3.0/24
Confidential & ProprietaryGoogle Cloud Platform 23
Labels
@meteatamel
Pod
Pod
frontend
Pod
frontend
Pod Pod
type = FE
version = v2
type = FE version = v2
● Metadata with semantic meaning
● Membership identifier
● The only Grouping Mechanism
Behavior Benefits
➔ Allow for intent of many users (e.g. dashboards)
➔ Build higher level systems …
➔ Queryable by Selectors
Dashboard
selector:
type = FE
Dashboard
selector:
version = v2
Confidential & ProprietaryGoogle Cloud Platform 24
Label Expressions
@meteatamel
Pod
Pod
frontend
Pod
frontend
Pod Pod
env = qa env = test
● env = prod
● tier != backend
● env = prod, tier !=backend
Expressions
● env in (test,qa)
● release notin (stable,beta)
● tier
● !tier
env = prod
Pod
env = prod
Dashboard
selector:
env = notin(prod)
Confidential & ProprietaryGoogle Cloud Platform 25
Services
@meteatamel
Client
Pod
Container
Pod
Container
Pod
Container
A logical grouping of pods that perform the
same function (the Service’s endpoints)
• grouped by label selector
Load balances incoming requests across
constituent pods
Choice of pod is random but supports
session affinity (ClientIP)
Gets a stable virtual IP and port
• also a DNS nametype =
Service
Label selector:
type = FE
VIP
type = FE type = FE type = FE
Confidential & ProprietaryGoogle Cloud Platform 26
Replication Controllers/Sets
@meteatamel
Replication
Controller Pod
frontend
Pod
frontend
app = demo app = demo app = demo
ReplicaSet
#pods = 3
app = demo
color in (blue,grey)
show: version = v2
color = blue color = blue color = grey
Behavior Benefits
● Keeps Pods running
● Gives direct control of Pod #s
● Grouped by Label Selector
➔ Recreates Pods, maintains desired state
➔ Fine-grained control for scaling
➔ Standard grouping semantics
Pod Pod Pod
Confidential & ProprietaryGoogle Cloud Platform 27
Replication Controllers/Sets
@meteatamel
ReplicaSet
- Name = “backend”
- Selector = {“name”: “backend”}
- Template = { ... }
- NumReplicas = 4
API Server
3
Start 1
more
OK 4
How
many?
How
many?
Canonical example of control loops
Have one job: ensure N copies of a pod
● if too few, start new ones
● if too many, kill some
● group == selector
Replicated pods are fungible
● No implied order or identity
Confidential & ProprietaryGoogle Cloud Platform 28
Scaling
@meteatamel
Service
Label selectors:
version = 1.0
type = Frontend
Service
name = frontend
Label selector:
type = BE
Replication
Controller Pod
frontend
Pod
version= v1 version = v1
ReplicaSet
version = v1
#pods = 1
show: version = v2
type = FE type = FE
Pod
frontend
Pod
version = v1
type = FE
ReplicaSet
version = v1
#pods = 2
show: version = v2
Pod Pod
ReplicaSet
version = v1
type = FE
#pods = 4
show: version = v2
version = v1
type = FE
Confidential & ProprietaryGoogle Cloud Platform 29
Canary
@meteatamel
Service
Label selectors:
version = 1.0
type = Frontend
Service
name = backend
Label selector:
type = BE
Replication
Controller
Pod
Pod
frontend
Pod
version= v1 version = v1
ReplicaSet
version = v1
type = BE
#pods = 2
show: version = v2
type = BE type = BE
Replication
Controller
ReplicaSet
version = v2
type = BE
#pods = 1
show: version = v2
Pod
frontend
Pod
version = v2
type = BE
Confidential & ProprietaryGoogle Cloud Platform 30
Autoscaling
@meteatamel
Replication
Controller Pod
frontend
Pod
name=locust name=locust
ReplicaSet
name=locust
role=worker
#pods = 1
show: version = v2
Pod
frontend
Pod
name=locust
ReplicaSet
name=locust
role=worker
#pods = 2
show: version = v2
Pod Pod
name=locust
Scale
CPU Target% = 50
Heapster
role=worker role=worker role=worker role=worker
ReplicaSet
name=locust
role=worker
#pods = 4
70% CPU
40% CPU
> 50% CPU< 50% CPU
Confidential & ProprietaryGoogle Cloud Platform 31
Rollout
@meteatamel
API
DeploymentDeployment
Create frontend-1234567
Deployment
Create frontend-1234567
Scale frontend-1234567 up to 1
Deployment
Create frontend-1234567
Scale frontend-1234567 up to 1
Scale frontend-7654321 down to 0
Pod Pod
frontend
Pod
version = v1
ReplicaSet
frontend-1234567
version = v2
type = BE
#pods = 0
show: version = v2
ReplicaSet
frontend-7654321
version = v1
type = BE
#pods = 2
version: v2
ReplicaSet
frontend-7654321
version: v1
type: BE
#pods = 0
version: v1
ReplicaSet
frontend-1234567
version = v2
type = BE
#pods = 1
show: version = v2
ReplicaSet
frontend-1234567
version: v2
type: BE
#pods = 2
type = BE type = BE
Pod
version: v2
type = BE
Servic
e
be-svc
Deployment
Create frontend-1234567
Scale frontend-1234567 up to 1
Scale frontend-7654321 down to 0
Scale frontend-1234567 up to 2
kubectl edit deployment ...
Confidential & ProprietaryGoogle Cloud Platform 32
There is much more!
@meteatamel
3333
kubernetes.io
cloud.google.com/container-engine
Mete Atamel
@meteatamel
atamel@google.com
meteatamel.wordpress.com
Thank You
@meteatamel
Ad

More Related Content

What's hot (20)

Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Eric Gustafson
 
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformKubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Michael O'Sullivan
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Michal Cwienczek
 
Platform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and DockerPlatform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and Docker
Julian Strobl
 
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
Codemotion
 
Scale out, with Kubernetes (k8s)
Scale out, with Kubernetes (k8s)Scale out, with Kubernetes (k8s)
Scale out, with Kubernetes (k8s)
Arkadiusz Borek
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
Paris Apostolopoulos
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Rishabh Indoria
 
Learn kubernetes in 90 minutes
Learn kubernetes in 90 minutesLearn kubernetes in 90 minutes
Learn kubernetes in 90 minutes
Larry Cai
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
Ronny Trommer
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Stanislav Pogrebnyak
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
Ross Kukulinski
 
Deep Dive into Kubernetes - Part 2
Deep Dive into Kubernetes - Part 2Deep Dive into Kubernetes - Part 2
Deep Dive into Kubernetes - Part 2
Imesh Gunaratne
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
Imesh Gunaratne
 
Kubernetes
KubernetesKubernetes
Kubernetes
erialc_w
 
Kubernetes in Docker
Kubernetes in DockerKubernetes in Docker
Kubernetes in Docker
docker-athens
 
Kubernetes 101 and Fun
Kubernetes 101 and FunKubernetes 101 and Fun
Kubernetes 101 and Fun
Mario-Leander Reimer
 
Rex gke-clustree
Rex gke-clustreeRex gke-clustree
Rex gke-clustree
Romain Vrignaud
 
Docker & Kubernetes intro
Docker & Kubernetes introDocker & Kubernetes intro
Docker & Kubernetes intro
Arnon Rotem-Gal-Oz
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10
Vishnu Kannan
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Eric Gustafson
 
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformKubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Michael O'Sullivan
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Michal Cwienczek
 
Platform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and DockerPlatform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and Docker
Julian Strobl
 
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
Codemotion
 
Scale out, with Kubernetes (k8s)
Scale out, with Kubernetes (k8s)Scale out, with Kubernetes (k8s)
Scale out, with Kubernetes (k8s)
Arkadiusz Borek
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Rishabh Indoria
 
Learn kubernetes in 90 minutes
Learn kubernetes in 90 minutesLearn kubernetes in 90 minutes
Learn kubernetes in 90 minutes
Larry Cai
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
Ronny Trommer
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
Ross Kukulinski
 
Deep Dive into Kubernetes - Part 2
Deep Dive into Kubernetes - Part 2Deep Dive into Kubernetes - Part 2
Deep Dive into Kubernetes - Part 2
Imesh Gunaratne
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
Imesh Gunaratne
 
Kubernetes
KubernetesKubernetes
Kubernetes
erialc_w
 
Kubernetes in Docker
Kubernetes in DockerKubernetes in Docker
Kubernetes in Docker
docker-athens
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10
Vishnu Kannan
 

Viewers also liked (14)

ContainerDayVietnam2016: Kubernetes State-of-the-art Container Management Pla...
ContainerDayVietnam2016: Kubernetes State-of-the-art Container Management Pla...ContainerDayVietnam2016: Kubernetes State-of-the-art Container Management Pla...
ContainerDayVietnam2016: Kubernetes State-of-the-art Container Management Pla...
Docker-Hanoi
 
Introduction to Kubernetes - Docker Global Mentor Week 2016
Introduction to Kubernetes - Docker Global Mentor Week 2016Introduction to Kubernetes - Docker Global Mentor Week 2016
Introduction to Kubernetes - Docker Global Mentor Week 2016
Opsta
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and tools
Ramit Surana
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Peng Xiao
 
Kubernetes automation in production
Kubernetes automation in productionKubernetes automation in production
Kubernetes automation in production
Paul Bakker
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and Introduction
Stefan Schimanski
 
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
Neo4j
 
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Thomas Fricke
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
Carlos Sanchez
 
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupKubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Stefan Schimanski
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
CJ Cullen
 
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD StoryLondon Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
Apigee | Google Cloud
 
Kubernetes in 30 minutes (2017/03/10)
Kubernetes in 30 minutes (2017/03/10)Kubernetes in 30 minutes (2017/03/10)
Kubernetes in 30 minutes (2017/03/10)
lestrrat
 
Musings on Mesos: Docker, Kubernetes, and Beyond.
Musings on Mesos: Docker, Kubernetes, and Beyond.Musings on Mesos: Docker, Kubernetes, and Beyond.
Musings on Mesos: Docker, Kubernetes, and Beyond.
Timothy St. Clair
 
ContainerDayVietnam2016: Kubernetes State-of-the-art Container Management Pla...
ContainerDayVietnam2016: Kubernetes State-of-the-art Container Management Pla...ContainerDayVietnam2016: Kubernetes State-of-the-art Container Management Pla...
ContainerDayVietnam2016: Kubernetes State-of-the-art Container Management Pla...
Docker-Hanoi
 
Introduction to Kubernetes - Docker Global Mentor Week 2016
Introduction to Kubernetes - Docker Global Mentor Week 2016Introduction to Kubernetes - Docker Global Mentor Week 2016
Introduction to Kubernetes - Docker Global Mentor Week 2016
Opsta
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and tools
Ramit Surana
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Peng Xiao
 
Kubernetes automation in production
Kubernetes automation in productionKubernetes automation in production
Kubernetes automation in production
Paul Bakker
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and Introduction
Stefan Schimanski
 
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
Neo4j
 
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Thomas Fricke
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
Carlos Sanchez
 
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupKubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Stefan Schimanski
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
CJ Cullen
 
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD StoryLondon Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
Apigee | Google Cloud
 
Kubernetes in 30 minutes (2017/03/10)
Kubernetes in 30 minutes (2017/03/10)Kubernetes in 30 minutes (2017/03/10)
Kubernetes in 30 minutes (2017/03/10)
lestrrat
 
Musings on Mesos: Docker, Kubernetes, and Beyond.
Musings on Mesos: Docker, Kubernetes, and Beyond.Musings on Mesos: Docker, Kubernetes, and Beyond.
Musings on Mesos: Docker, Kubernetes, and Beyond.
Timothy St. Clair
 
Ad

Similar to Introduction to kubernetes (20)

Mete Atamel "Resilient microservices with kubernetes"
Mete Atamel "Resilient microservices with kubernetes"Mete Atamel "Resilient microservices with kubernetes"
Mete Atamel "Resilient microservices with kubernetes"
IT Event
 
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Codemotion
 
Mete Atamel
Mete AtamelMete Atamel
Mete Atamel
CodeFest
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps Workshop
Weaveworks
 
AKS: k8s e azure
AKS: k8s e azureAKS: k8s e azure
AKS: k8s e azure
Alessandro Melchiori
 
Dolibarr - What's new in 21.0 - DevCamp Nancy 2024.pptx
Dolibarr - What's new in 21.0 - DevCamp Nancy 2024.pptxDolibarr - What's new in 21.0 - DevCamp Nancy 2024.pptx
Dolibarr - What's new in 21.0 - DevCamp Nancy 2024.pptx
Laurent Destailleur
 
Containerised ASP.NET Core apps with Kubernetes
Containerised ASP.NET Core apps with KubernetesContainerised ASP.NET Core apps with Kubernetes
Containerised ASP.NET Core apps with Kubernetes
Codemotion Tel Aviv
 
Odo improving the developer experience on OpenShift - hack &amp; sangria
Odo   improving the developer experience on OpenShift - hack &amp; sangriaOdo   improving the developer experience on OpenShift - hack &amp; sangria
Odo improving the developer experience on OpenShift - hack &amp; sangria
Jorge Morales
 
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Free GitOps Workshop (with Intro to Kubernetes & GitOps)Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Weaveworks
 
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
Puppet
 
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
Automated Provisioning, Management & Cost Control for Kubernetes ClustersAutomated Provisioning, Management & Cost Control for Kubernetes Clusters
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
Weaveworks
 
Cluster management with Kubernetes
Cluster management with KubernetesCluster management with Kubernetes
Cluster management with Kubernetes
Satnam Singh
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 
KubeCon EU 2022 Istio, Flux & Flagger.pdf
KubeCon EU 2022 Istio, Flux & Flagger.pdfKubeCon EU 2022 Istio, Flux & Flagger.pdf
KubeCon EU 2022 Istio, Flux & Flagger.pdf
Weaveworks
 
Rejekts 24 EU No GitOps Pain, No Platform Gain
Rejekts 24 EU No GitOps Pain, No Platform GainRejekts 24 EU No GitOps Pain, No Platform Gain
Rejekts 24 EU No GitOps Pain, No Platform Gain
Łukasz Piątkowski
 
CICD_BestPractices.pdf
CICD_BestPractices.pdfCICD_BestPractices.pdf
CICD_BestPractices.pdf
motupalli2
 
DevOps-Ebook
DevOps-EbookDevOps-Ebook
DevOps-Ebook
PrathapM32
 
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Webinar: Capabilities, Confidence and Community – What Flux GA Means for YouWebinar: Capabilities, Confidence and Community – What Flux GA Means for You
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Weaveworks
 
Federated Kubernetes: As a Platform for Distributed Scientific Computing
Federated Kubernetes: As a Platform for Distributed Scientific ComputingFederated Kubernetes: As a Platform for Distributed Scientific Computing
Federated Kubernetes: As a Platform for Distributed Scientific Computing
Bob Killen
 
Weave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any KubernetesWeave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any Kubernetes
Weaveworks
 
Mete Atamel "Resilient microservices with kubernetes"
Mete Atamel "Resilient microservices with kubernetes"Mete Atamel "Resilient microservices with kubernetes"
Mete Atamel "Resilient microservices with kubernetes"
IT Event
 
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Codemotion
 
Mete Atamel
Mete AtamelMete Atamel
Mete Atamel
CodeFest
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps Workshop
Weaveworks
 
Dolibarr - What's new in 21.0 - DevCamp Nancy 2024.pptx
Dolibarr - What's new in 21.0 - DevCamp Nancy 2024.pptxDolibarr - What's new in 21.0 - DevCamp Nancy 2024.pptx
Dolibarr - What's new in 21.0 - DevCamp Nancy 2024.pptx
Laurent Destailleur
 
Containerised ASP.NET Core apps with Kubernetes
Containerised ASP.NET Core apps with KubernetesContainerised ASP.NET Core apps with Kubernetes
Containerised ASP.NET Core apps with Kubernetes
Codemotion Tel Aviv
 
Odo improving the developer experience on OpenShift - hack &amp; sangria
Odo   improving the developer experience on OpenShift - hack &amp; sangriaOdo   improving the developer experience on OpenShift - hack &amp; sangria
Odo improving the developer experience on OpenShift - hack &amp; sangria
Jorge Morales
 
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Free GitOps Workshop (with Intro to Kubernetes & GitOps)Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Weaveworks
 
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
Puppet
 
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
Automated Provisioning, Management & Cost Control for Kubernetes ClustersAutomated Provisioning, Management & Cost Control for Kubernetes Clusters
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
Weaveworks
 
Cluster management with Kubernetes
Cluster management with KubernetesCluster management with Kubernetes
Cluster management with Kubernetes
Satnam Singh
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 
KubeCon EU 2022 Istio, Flux & Flagger.pdf
KubeCon EU 2022 Istio, Flux & Flagger.pdfKubeCon EU 2022 Istio, Flux & Flagger.pdf
KubeCon EU 2022 Istio, Flux & Flagger.pdf
Weaveworks
 
Rejekts 24 EU No GitOps Pain, No Platform Gain
Rejekts 24 EU No GitOps Pain, No Platform GainRejekts 24 EU No GitOps Pain, No Platform Gain
Rejekts 24 EU No GitOps Pain, No Platform Gain
Łukasz Piątkowski
 
CICD_BestPractices.pdf
CICD_BestPractices.pdfCICD_BestPractices.pdf
CICD_BestPractices.pdf
motupalli2
 
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Webinar: Capabilities, Confidence and Community – What Flux GA Means for YouWebinar: Capabilities, Confidence and Community – What Flux GA Means for You
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Weaveworks
 
Federated Kubernetes: As a Platform for Distributed Scientific Computing
Federated Kubernetes: As a Platform for Distributed Scientific ComputingFederated Kubernetes: As a Platform for Distributed Scientific Computing
Federated Kubernetes: As a Platform for Distributed Scientific Computing
Bob Killen
 
Weave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any KubernetesWeave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any Kubernetes
Weaveworks
 
Ad

Recently uploaded (20)

Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 

Introduction to kubernetes

  • 1. Introduction to Kubernetes Mete Atamel Developer Advocate for Google Cloud @meteatamel
  • 2. Confidential & ProprietaryGoogle Cloud Platform 2 Mete Atamel Developer Advocate for Google Cloud Platform @meteatamel [email protected] meteatamel.wordpress.com @meteatamel
  • 4. Agenda The Monolith What is the Monolith and why is it bad? Breaking The Monolith into Microservices Why Microservices is the way to go? Problems with Microservices Exchanging one set of problems with another? Containers and Kubernetes What are containers and Kubernetes, how do they help? Kubernetes building blocks Pods, services, replication controllers/set and more @meteatamel
  • 6. Confidential & ProprietaryGoogle Cloud Platform 6 What is the Monolith? @meteatamel APP SERVER Module 1 Module 2 Module 3 DB
  • 7. Confidential & ProprietaryGoogle Cloud Platform 7 Problems with the Monolith Unnecessary tight coupling among different modules All at once, or none at all update policy Hard to scale different parts independently Ignores different development velocity of different teams completely Hard to establish ownership of the whole system as it’s huge Hard to debug and test in general, hard to run on a single development machine @meteatamel
  • 8. Breaking the Monolith into Microservices @meteatamel
  • 9. Confidential & ProprietaryGoogle Cloud Platform 9 The Monolith to Microservices @meteatamel Microservice1 DB1 Microservice2 DB2 Microservice3 DB3
  • 10. Confidential & ProprietaryGoogle Cloud Platform 10 Problems with Microservices Need to worry about multiple independent systems instead of one Can be hard to debug and test across multiple services without proper logging “But it works on my machine!” problem still applies Common maintenance problems still apply: Redundancy, resilience, rolling upgrades, rolling downgrades @meteatamel
  • 12. Confidential & ProprietaryGoogle Cloud Platform 12 Quick recap of Containers @meteatamel Lightweight Hermetically sealed Isolated Easily deployable Introspectable Runnable Linux processes Improves overall developer experience Fosters code and component reuse Simplifies operations for cloud native applications Docker
  • 13. Confidential & ProprietaryGoogle Cloud Platform 13 Everything at Google runs on containers Gmail, Web Search, Maps, ... MapReduce, batch, ... GFS, Colossus, ... Google’s Cloud Platform: VMs run in containers! We launch over 2 billion containers per week
  • 14. Confidential & ProprietaryGoogle Cloud Platform 14 Containers are great but not enough Containers help to create a lightweight and consistent environment for apps But it does not solve common app management problems: ● Deploy your a new version of your app reliably ● Create resiliency ● Scale up and down ● Rollback a deployment ● Health checks ● Graceful shutdown ● Etc. etc. etc. @meteatamel
  • 15. Confidential & ProprietaryGoogle Cloud Platform 15 Kubernetes comes to rescue http://kubernetes.io Open source container management platform Based on years of experience running Borg at Google Runs everywhere: your laptop, on-prem, different cloud platforms Helps with reliable deployment of apps, scaling, roll out and roll back of versions, autoscaling, health checks and more! @meteatamel
  • 16. Confidential & ProprietaryGoogle Cloud Platform 16 Kubernetes Cluster @meteatamel K8s Master API Server Dash Board scheduler Kubelet Kubelet Kubelet Kubelet Container Registry etcdControllers web browsers kubectl web browsers Config file Image
  • 17. Confidential & ProprietaryGoogle Cloud Platform 17 Kubernetes Cluster @meteatamel K8s Master API Server Dash Board scheduler Kubelet Kubelet Kubelet Kubelet etcdControllers web browsers kubectl web browsers Config file Image Container Registry
  • 18. Confidential & ProprietaryGoogle Cloud Platform 18 Kubernetes Cluster on GKE @meteatamel
  • 20. Confidential & ProprietaryGoogle Cloud Platform 20 Pods @meteatamel The atom of scheduling for containers Represents an application specific logical host Hosts containers and volumes Each has its own routable (no NAT) IP address Ephemeral • Pods are functionally identical and therefore ephemeral and replaceable Pod Web Server Volume Consumers
  • 21. Confidential & ProprietaryGoogle Cloud Platform 21 Pods @meteatamel Pod Git Synchronizer Node.js App Container Volume Consumersgit Repo Can be used to group multiple containers & shared volumes Containers within a pod are tightly coupled Shared namespaces • Containers in a pod share IP, port and IPC namespaces • Containers in a pod talk to each other through localhost
  • 22. Confidential & ProprietaryGoogle Cloud Platform 22 Pods @meteatamel Pods have IPs which are routable Pods can reach each other without NAT Even across nodes No Brokering of Port Numbers These are fundamental requirements Many solutions GCE Advanced Routes, AWS Flannel, Weave, OpenVSwitch, Cloud Provider 10.1.2.0/24 10.1.1.0/24 10.1.1.211 10.1.1.2 10.1.2.106 10.1.3.0/24 10.1.3.4510.1.3.17 10.1.3.0/24
  • 23. Confidential & ProprietaryGoogle Cloud Platform 23 Labels @meteatamel Pod Pod frontend Pod frontend Pod Pod type = FE version = v2 type = FE version = v2 ● Metadata with semantic meaning ● Membership identifier ● The only Grouping Mechanism Behavior Benefits ➔ Allow for intent of many users (e.g. dashboards) ➔ Build higher level systems … ➔ Queryable by Selectors Dashboard selector: type = FE Dashboard selector: version = v2
  • 24. Confidential & ProprietaryGoogle Cloud Platform 24 Label Expressions @meteatamel Pod Pod frontend Pod frontend Pod Pod env = qa env = test ● env = prod ● tier != backend ● env = prod, tier !=backend Expressions ● env in (test,qa) ● release notin (stable,beta) ● tier ● !tier env = prod Pod env = prod Dashboard selector: env = notin(prod)
  • 25. Confidential & ProprietaryGoogle Cloud Platform 25 Services @meteatamel Client Pod Container Pod Container Pod Container A logical grouping of pods that perform the same function (the Service’s endpoints) • grouped by label selector Load balances incoming requests across constituent pods Choice of pod is random but supports session affinity (ClientIP) Gets a stable virtual IP and port • also a DNS nametype = Service Label selector: type = FE VIP type = FE type = FE type = FE
  • 26. Confidential & ProprietaryGoogle Cloud Platform 26 Replication Controllers/Sets @meteatamel Replication Controller Pod frontend Pod frontend app = demo app = demo app = demo ReplicaSet #pods = 3 app = demo color in (blue,grey) show: version = v2 color = blue color = blue color = grey Behavior Benefits ● Keeps Pods running ● Gives direct control of Pod #s ● Grouped by Label Selector ➔ Recreates Pods, maintains desired state ➔ Fine-grained control for scaling ➔ Standard grouping semantics Pod Pod Pod
  • 27. Confidential & ProprietaryGoogle Cloud Platform 27 Replication Controllers/Sets @meteatamel ReplicaSet - Name = “backend” - Selector = {“name”: “backend”} - Template = { ... } - NumReplicas = 4 API Server 3 Start 1 more OK 4 How many? How many? Canonical example of control loops Have one job: ensure N copies of a pod ● if too few, start new ones ● if too many, kill some ● group == selector Replicated pods are fungible ● No implied order or identity
  • 28. Confidential & ProprietaryGoogle Cloud Platform 28 Scaling @meteatamel Service Label selectors: version = 1.0 type = Frontend Service name = frontend Label selector: type = BE Replication Controller Pod frontend Pod version= v1 version = v1 ReplicaSet version = v1 #pods = 1 show: version = v2 type = FE type = FE Pod frontend Pod version = v1 type = FE ReplicaSet version = v1 #pods = 2 show: version = v2 Pod Pod ReplicaSet version = v1 type = FE #pods = 4 show: version = v2 version = v1 type = FE
  • 29. Confidential & ProprietaryGoogle Cloud Platform 29 Canary @meteatamel Service Label selectors: version = 1.0 type = Frontend Service name = backend Label selector: type = BE Replication Controller Pod Pod frontend Pod version= v1 version = v1 ReplicaSet version = v1 type = BE #pods = 2 show: version = v2 type = BE type = BE Replication Controller ReplicaSet version = v2 type = BE #pods = 1 show: version = v2 Pod frontend Pod version = v2 type = BE
  • 30. Confidential & ProprietaryGoogle Cloud Platform 30 Autoscaling @meteatamel Replication Controller Pod frontend Pod name=locust name=locust ReplicaSet name=locust role=worker #pods = 1 show: version = v2 Pod frontend Pod name=locust ReplicaSet name=locust role=worker #pods = 2 show: version = v2 Pod Pod name=locust Scale CPU Target% = 50 Heapster role=worker role=worker role=worker role=worker ReplicaSet name=locust role=worker #pods = 4 70% CPU 40% CPU > 50% CPU< 50% CPU
  • 31. Confidential & ProprietaryGoogle Cloud Platform 31 Rollout @meteatamel API DeploymentDeployment Create frontend-1234567 Deployment Create frontend-1234567 Scale frontend-1234567 up to 1 Deployment Create frontend-1234567 Scale frontend-1234567 up to 1 Scale frontend-7654321 down to 0 Pod Pod frontend Pod version = v1 ReplicaSet frontend-1234567 version = v2 type = BE #pods = 0 show: version = v2 ReplicaSet frontend-7654321 version = v1 type = BE #pods = 2 version: v2 ReplicaSet frontend-7654321 version: v1 type: BE #pods = 0 version: v1 ReplicaSet frontend-1234567 version = v2 type = BE #pods = 1 show: version = v2 ReplicaSet frontend-1234567 version: v2 type: BE #pods = 2 type = BE type = BE Pod version: v2 type = BE Servic e be-svc Deployment Create frontend-1234567 Scale frontend-1234567 up to 1 Scale frontend-7654321 down to 0 Scale frontend-1234567 up to 2 kubectl edit deployment ...
  • 32. Confidential & ProprietaryGoogle Cloud Platform 32 There is much more! @meteatamel