SlideShare a Scribd company logo
Confidential & ProprietaryGoogle Cloud Platform 1
Kubernetes, Containers and Cloud
The MoD Story
Mete Atamel
Developer Advocate
Google
Steve Latchem
Head of App Services & DevOps
UK Ministry of Defence
Confidential & ProprietaryGoogle Cloud Platform 2
Agenda
The Monolith and Microservices
What is the Monolith and how do Microservices help (or not)?
Containers and Kubernetes
What are they? What problems do they solve?
Kubernetes Building Blocks
Pods, services, replication controllers/set and more
Defence-as-a-Platform
The MoD Journey
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 3
The Monolith
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 4
What is the Monolith?
@meteatamel
APP SERVER
Module1 Module2 Module3
DB
Confidential & ProprietaryGoogle Cloud Platform 5
Problems with the Monolith
Unnecessary tight coupling among different modules
All at once update policy, ignores different development velocities
Hard to scale different parts independently
Hard to establish ownership of the whole system
Hard to debug and test in general, hard to run on a single development machine
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 6
Breaking the Monolith into Microservices
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 7
The Monolith to Microservices
@meteatamel
Microservice1
DB1
Microservice2
DB2
Microservice3
DB3
Confidential & ProprietaryGoogle Cloud Platform 8
Problems with Microservices
Need to worry about multiple independent systems instead of one
Debugging and testing across multiple services can be hard without proper
instrumentation
“But it works on my machine!” problem still applies
Common maintenance problems still apply: Redundancy, resilience,
upgrades/downgrades, scaling up/down
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 9
Containers and Kubernetes
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 10
Quick recap of Containers
@meteatamel
Lightweight
Hermetically sealed
Isolated
Easily deployable
Introspectable
Runnable
Linux processes
Docker
A lightweight way to virtualize applications
Confidential & ProprietaryGoogle Cloud Platform 11
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 12
Containers are great but not enough
Containers help to create a lightweight and consistent environment for apps
But they do not solve common app management problems:
● Deploy your a new version of your app reliably
● Create resiliency
● Scale up and down
● Update to a new version
● Rollback to a previous version
● Health checks
● Graceful shutdown
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 13
Kubernetes comes to rescue
https://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
Provides a high level API to manage containers
Helps with reliable deployment of apps, scaling, roll out and roll back of versions,
autoscaling, health checks and much more!
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 14
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 15
Kubernetes Cluster on GKE
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 16
Kubernetes Building Blocks
@meteatamel
Confidential & ProprietaryGoogle Cloud Platform 17
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 18
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 19
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 20
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 21
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 22
Replica 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 23
Replica 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 24
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 25
Canary Deployments
@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 26
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 27
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 28
There is much more!
Namespace, Deployment, StatefulSet,
DaemonSet, Job, ConfigMap, Secret,
Federation
@meteatamel
2929
kubernetes.io
cloud.google.com/container-engine
Mete Atamel
@meteatamel
atamel@google.com
meteatamel.wordpress.com
Thank You
@meteatamel
Defence-as-a-Platform
The MOD Journey
Steve Latchem
Head of App Services & DevOps
Hybrid Cloud
Hybrid Cloud
MOD Remote/
Home Worker
Organisations
with existing
RLI Connections
Trust Zone
2a
Industry
RLI gateway
Organisations
with existing
SLI connections
Deployed
rented
servers
Trust Zone
1
Trust Zone
4
Industry
SLI gateway
Including non-RLI/SLI
connected organisations,
through horizontal
collaboration
Internet
gateway
Internet
Public
MOD
Wide Area
Network
Shared
O-Cloud
Shared
S-Cloud
32 DEFENCE-AS-A-PLATFORM
Ruggedised Containers
Containers Everywhere
Containers Everywhere
Containers Everywhere
Empty OS
Container
Catalogue of Pre-Accredited
Container Categories
Catalogue of
Server Types / Host OS / Security Levels
LINUX VM HOSTMS VM HOST RENTED SERVER
FROM:
Microsoft
Web over SQL
AS
DT
SUPPLI
ERS
ACCREDITATIONSCOPE
FROM: FROM:
Microsoft
Web over SQL
ActiveMQ,
JBOSS, SQL
Hypervisor Neutral VM Configuration (e.g. TOSCA)
Ruggedised Container Library, ready for Orchestration
Container Orchestration of Choice, e.g. Kubernetes (Linux & MSFT)
DevOps Containers Everywhere
Print/
File Service
Hypervisor plus
OS from the
Cloud
SDN
IdAM
Cyber
Monitor
Env.
Monitor
Gateway
DataSync /
SIEPatch
Service NATO C3
Taxonomy
Funct.
Test Suite
Non-Funct.
Test Suite
Accredited Container
Apps
DBs
Apps
DBs
Apps
DBs
Containers Everywhere
35 DEFENCE-AS-A-PLATFORM
Apps and Container Lifecycle
Defence-as-a-Platform
steve.latchem100@mod.gov.uk
Thank you

More Related Content

PPTX
Adapt or Die: A Microservices Story at Google
PPTX
API Management and Kubernetes
PDF
Apigee Edge: Intro to Microgateway
PPTX
Adapt or Die: Serverless Microservices
PPTX
Adapt or Die Sydney - 5 Things Developers Should Know About Serverless
PDF
London Adapt or Die: Opening Keynot
PPTX
Node.js - Extending the Programmability of Apigee Edge
PDF
I Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations Workshop
Adapt or Die: A Microservices Story at Google
API Management and Kubernetes
Apigee Edge: Intro to Microgateway
Adapt or Die: Serverless Microservices
Adapt or Die Sydney - 5 Things Developers Should Know About Serverless
London Adapt or Die: Opening Keynot
Node.js - Extending the Programmability of Apigee Edge
I Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations Workshop

What's hot (20)

PPTX
How to Manage Microservices and APIs with Apigee and Istio
PPTX
Apigee Products Overview
PDF
API workshop by AWS and 3scale
PPTX
Adapt or Die DevJam: San Francisco, Sept 27 2016
PPTX
API Services: Building State-of-the-Art APIs
PDF
Cloud-native Patterns (July 4th, 2019)
PDF
Pivotal + Apigee Workshop (June 4th, 2019)
PDF
2019 devoxx - apis, microservices, et le service mesh
PPTX
Apigee Insights: Data & Context-Driven Actions
PDF
apidays LIVE Hong Kong 2021 - Automating the API Product Lifecycle by Jeremy ...
PDF
apidays LIVE Paris - Innovation and rejuvenation combined: a beneficial appro...
PPTX
Apigee Product Roadmap Part 2
PPTX
02 api gateway
PPTX
What is APIGEE? What are the benefits of APIGEE?
PPTX
Apigee Edge Product Demo
PDF
Build and Manage Serverless APIs (APIDays Nordic, May 19th 2016)
PDF
Webcast: Deep-Dive Apigee Edge Microgateway
PDF
Deep Dive: Strategic Importance of BaaS
PPTX
API Design Best Practices & Tech Talk : API Craft Meetup @ Apigee
PDF
Developer Experience (DX) as a Fitness Function for Platform Teams
How to Manage Microservices and APIs with Apigee and Istio
Apigee Products Overview
API workshop by AWS and 3scale
Adapt or Die DevJam: San Francisco, Sept 27 2016
API Services: Building State-of-the-Art APIs
Cloud-native Patterns (July 4th, 2019)
Pivotal + Apigee Workshop (June 4th, 2019)
2019 devoxx - apis, microservices, et le service mesh
Apigee Insights: Data & Context-Driven Actions
apidays LIVE Hong Kong 2021 - Automating the API Product Lifecycle by Jeremy ...
apidays LIVE Paris - Innovation and rejuvenation combined: a beneficial appro...
Apigee Product Roadmap Part 2
02 api gateway
What is APIGEE? What are the benefits of APIGEE?
Apigee Edge Product Demo
Build and Manage Serverless APIs (APIDays Nordic, May 19th 2016)
Webcast: Deep-Dive Apigee Edge Microgateway
Deep Dive: Strategic Importance of BaaS
API Design Best Practices & Tech Talk : API Craft Meetup @ Apigee
Developer Experience (DX) as a Fitness Function for Platform Teams
Ad

Viewers also liked (20)

PPTX
London Adapt or Die: Securing your APIs the Right Way!
PPTX
Microservices Done Right: Key Ingredients for Microservices Success
PPTX
London Adapt or Die: Five Things Enterprises Should Know About Serverless
PDF
Adapt or Die: Opening Keynote with Chet Kapoor
PDF
Adapt or Die: Keynote with Greg Brail
PDF
London Adapt or Die: Lunch keynote
PDF
Adapt or Die: Keynote with Anant Jhingran
PPTX
Adapt or Die Sydney - API Security
PDF
London Adapt or Die: Closing Keynote — Adapt Now!
PDF
An Introduction to Kubernetes
PDF
Kubernetes on aws
PDF
Extend and build on Kubernetes
PPTX
Docker and kubernetes
PPTX
Monitoring, Logging and Tracing on Kubernetes
PDF
Platforms, Cloud-Native Architectures, and APIs: Chicago Adapt or Die Keynote
PPTX
Deploying apps with Docker and Kubernetes
PPTX
London Adapt or Die: Opening Keynote with Chet Kapoor
PPTX
Becoming the Uncarrier: T-Mobile's Digital Journey
PPTX
API Governance in the Enterprise
PDF
Continuous delivery of microservices with kubernetes - Quintor 27-2-2017
London Adapt or Die: Securing your APIs the Right Way!
Microservices Done Right: Key Ingredients for Microservices Success
London Adapt or Die: Five Things Enterprises Should Know About Serverless
Adapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Keynote with Greg Brail
London Adapt or Die: Lunch keynote
Adapt or Die: Keynote with Anant Jhingran
Adapt or Die Sydney - API Security
London Adapt or Die: Closing Keynote — Adapt Now!
An Introduction to Kubernetes
Kubernetes on aws
Extend and build on Kubernetes
Docker and kubernetes
Monitoring, Logging and Tracing on Kubernetes
Platforms, Cloud-Native Architectures, and APIs: Chicago Adapt or Die Keynote
Deploying apps with Docker and Kubernetes
London Adapt or Die: Opening Keynote with Chet Kapoor
Becoming the Uncarrier: T-Mobile's Digital Journey
API Governance in the Enterprise
Continuous delivery of microservices with kubernetes - Quintor 27-2-2017
Ad

Similar to London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story (20)

PDF
Introduction to kubernetes
PDF
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
PDF
Mete Atamel
PDF
Mete Atamel "Resilient microservices with kubernetes"
PDF
Containerised ASP.NET Core apps with Kubernetes
PDF
TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...
PDF
Resilient microservices with Kubernetes - Mete Atamel
PDF
Mattia Gandolfi - Improving utilization and portability with Containers and C...
PDF
What's new in Kubernetes
PDF
Google Cloud Platform and Kubernetes
PDF
Ignacy Kowalczyk
PDF
Understanding Kubernetes
PDF
2016 08-30 Kubernetes talk for Waterloo DevOps
PDF
Kubernetes best practices
PDF
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
PPTX
Session 4 GCCP.pptx
PDF
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
PDF
Webinar- Tea for the Tillerman
PDF
Kubernetes go paddle meetup
PDF
Container Camp London (2016-09-09)
Introduction to kubernetes
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Mete Atamel
Mete Atamel "Resilient microservices with kubernetes"
Containerised ASP.NET Core apps with Kubernetes
TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...
Resilient microservices with Kubernetes - Mete Atamel
Mattia Gandolfi - Improving utilization and portability with Containers and C...
What's new in Kubernetes
Google Cloud Platform and Kubernetes
Ignacy Kowalczyk
Understanding Kubernetes
2016 08-30 Kubernetes talk for Waterloo DevOps
Kubernetes best practices
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Session 4 GCCP.pptx
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
Webinar- Tea for the Tillerman
Kubernetes go paddle meetup
Container Camp London (2016-09-09)

More from Apigee | Google Cloud (12)

PDF
How Secure Are Your APIs?
PDF
Magazine Luiza at a glance (1)
PPTX
Monetization: Unlock More Value from Your APIs
PDF
Apigee Demo: API Platform Overview
PDF
Ticketmaster at a glance
PDF
AccuWeather: Recasting API Experiences in a Developer-First World
PDF
Which Application Modernization Pattern Is Right For You?
PPTX
The Four Transformative Forces of the API Management Market
PDF
Walgreens at a glance
PDF
Managing the Complexity of Microservices Deployments
PDF
Pitney Bowes at a glance
PPTX
London adapt or-die opening keynote chet kapoor
How Secure Are Your APIs?
Magazine Luiza at a glance (1)
Monetization: Unlock More Value from Your APIs
Apigee Demo: API Platform Overview
Ticketmaster at a glance
AccuWeather: Recasting API Experiences in a Developer-First World
Which Application Modernization Pattern Is Right For You?
The Four Transformative Forces of the API Management Market
Walgreens at a glance
Managing the Complexity of Microservices Deployments
Pitney Bowes at a glance
London adapt or-die opening keynote chet kapoor

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Cloud computing and distributed systems.
PPT
Teaching material agriculture food technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Advanced IT Governance
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Machine learning based COVID-19 study performance prediction
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
Mobile App Security Testing_ A Comprehensive Guide.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Cloud computing and distributed systems.
Teaching material agriculture food technology
Network Security Unit 5.pdf for BCA BBA.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
NewMind AI Monthly Chronicles - July 2025
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Advanced IT Governance
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
MYSQL Presentation for SQL database connectivity
Machine learning based COVID-19 study performance prediction
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectral efficient network and resource selection model in 5G networks
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Understanding_Digital_Forensics_Presentation.pptx
Review of recent advances in non-invasive hemoglobin estimation

London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story

  • 1. Confidential & ProprietaryGoogle Cloud Platform 1 Kubernetes, Containers and Cloud The MoD Story Mete Atamel Developer Advocate Google Steve Latchem Head of App Services & DevOps UK Ministry of Defence
  • 2. Confidential & ProprietaryGoogle Cloud Platform 2 Agenda The Monolith and Microservices What is the Monolith and how do Microservices help (or not)? Containers and Kubernetes What are they? What problems do they solve? Kubernetes Building Blocks Pods, services, replication controllers/set and more Defence-as-a-Platform The MoD Journey @meteatamel
  • 3. Confidential & ProprietaryGoogle Cloud Platform 3 The Monolith @meteatamel
  • 4. Confidential & ProprietaryGoogle Cloud Platform 4 What is the Monolith? @meteatamel APP SERVER Module1 Module2 Module3 DB
  • 5. Confidential & ProprietaryGoogle Cloud Platform 5 Problems with the Monolith Unnecessary tight coupling among different modules All at once update policy, ignores different development velocities Hard to scale different parts independently Hard to establish ownership of the whole system Hard to debug and test in general, hard to run on a single development machine @meteatamel
  • 6. Confidential & ProprietaryGoogle Cloud Platform 6 Breaking the Monolith into Microservices @meteatamel
  • 7. Confidential & ProprietaryGoogle Cloud Platform 7 The Monolith to Microservices @meteatamel Microservice1 DB1 Microservice2 DB2 Microservice3 DB3
  • 8. Confidential & ProprietaryGoogle Cloud Platform 8 Problems with Microservices Need to worry about multiple independent systems instead of one Debugging and testing across multiple services can be hard without proper instrumentation “But it works on my machine!” problem still applies Common maintenance problems still apply: Redundancy, resilience, upgrades/downgrades, scaling up/down @meteatamel
  • 9. Confidential & ProprietaryGoogle Cloud Platform 9 Containers and Kubernetes @meteatamel
  • 10. Confidential & ProprietaryGoogle Cloud Platform 10 Quick recap of Containers @meteatamel Lightweight Hermetically sealed Isolated Easily deployable Introspectable Runnable Linux processes Docker A lightweight way to virtualize applications
  • 11. Confidential & ProprietaryGoogle Cloud Platform 11 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
  • 12. Confidential & ProprietaryGoogle Cloud Platform 12 Containers are great but not enough Containers help to create a lightweight and consistent environment for apps But they do not solve common app management problems: ● Deploy your a new version of your app reliably ● Create resiliency ● Scale up and down ● Update to a new version ● Rollback to a previous version ● Health checks ● Graceful shutdown @meteatamel
  • 13. Confidential & ProprietaryGoogle Cloud Platform 13 Kubernetes comes to rescue https://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 Provides a high level API to manage containers Helps with reliable deployment of apps, scaling, roll out and roll back of versions, autoscaling, health checks and much more! @meteatamel
  • 14. Confidential & ProprietaryGoogle Cloud Platform 14 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
  • 15. Confidential & ProprietaryGoogle Cloud Platform 15 Kubernetes Cluster on GKE @meteatamel
  • 16. Confidential & ProprietaryGoogle Cloud Platform 16 Kubernetes Building Blocks @meteatamel
  • 17. Confidential & ProprietaryGoogle Cloud Platform 17 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
  • 18. Confidential & ProprietaryGoogle Cloud Platform 18 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
  • 19. Confidential & ProprietaryGoogle Cloud Platform 19 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
  • 20. Confidential & ProprietaryGoogle Cloud Platform 20 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)
  • 21. Confidential & ProprietaryGoogle Cloud Platform 21 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
  • 22. Confidential & ProprietaryGoogle Cloud Platform 22 Replica 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
  • 23. Confidential & ProprietaryGoogle Cloud Platform 23 Replica 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
  • 24. Confidential & ProprietaryGoogle Cloud Platform 24 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
  • 25. Confidential & ProprietaryGoogle Cloud Platform 25 Canary Deployments @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
  • 26. Confidential & ProprietaryGoogle Cloud Platform 26 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
  • 27. Confidential & ProprietaryGoogle Cloud Platform 27 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 ...
  • 28. Confidential & ProprietaryGoogle Cloud Platform 28 There is much more! Namespace, Deployment, StatefulSet, DaemonSet, Job, ConfigMap, Secret, Federation @meteatamel
  • 30. Defence-as-a-Platform The MOD Journey Steve Latchem Head of App Services & DevOps
  • 31. Hybrid Cloud Hybrid Cloud MOD Remote/ Home Worker Organisations with existing RLI Connections Trust Zone 2a Industry RLI gateway Organisations with existing SLI connections Deployed rented servers Trust Zone 1 Trust Zone 4 Industry SLI gateway Including non-RLI/SLI connected organisations, through horizontal collaboration Internet gateway Internet Public MOD Wide Area Network Shared O-Cloud Shared S-Cloud
  • 33. Containers Everywhere Containers Everywhere Empty OS Container Catalogue of Pre-Accredited Container Categories Catalogue of Server Types / Host OS / Security Levels LINUX VM HOSTMS VM HOST RENTED SERVER FROM: Microsoft Web over SQL AS DT SUPPLI ERS ACCREDITATIONSCOPE FROM: FROM: Microsoft Web over SQL ActiveMQ, JBOSS, SQL Hypervisor Neutral VM Configuration (e.g. TOSCA) Ruggedised Container Library, ready for Orchestration Container Orchestration of Choice, e.g. Kubernetes (Linux & MSFT)
  • 34. DevOps Containers Everywhere Print/ File Service Hypervisor plus OS from the Cloud SDN IdAM Cyber Monitor Env. Monitor Gateway DataSync / SIEPatch Service NATO C3 Taxonomy Funct. Test Suite Non-Funct. Test Suite Accredited Container Apps DBs Apps DBs Apps DBs Containers Everywhere
  • 35. 35 DEFENCE-AS-A-PLATFORM Apps and Container Lifecycle