SlideShare ist ein Scribd-Unternehmen logo
1 von 63
Building a Microservices
Platform with Kubernetes
Matthew Mark Miller
@DataMiller
InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
microservices-kubernetes
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon San Francisco
www.qconsf.com
Cloud Native:
Microservices running inside
Containers on top of
Platforms on any infrastructure
Microservice
A software component of a system that is independently
releasable and independently scalable from other parts of the
system.
Container
A software process whose access has been reduced to the
point that it thinks it is the only thing running.
Platform
The parts of your service that you don't build yourself.
But wait...aren’t we supposed to be Full
Stack?!
A platform’s responsibility is to make
implicit the link between a service and
the resource it consumes.
Clouds operate because of workload orchestration
Don’t roll your own orchestration.
Integrating workloads requires tinkering at runtime
Token swapping
Modifications to the host container’s configuration
Swapping in binaries
Integrating this way isn’t easy
Takes time & testing to get it right
What you built and tested isn’t necessarily what
runs in production.
Leads to providers offering fewer, more highly
opinionated stacks
A big question for platform
engineers:
How can we spend more time building useful
services and less time maintaining the platform?
Kubernetes
Borg meets Docker; Resistance is futile
(Obligatory architecture slide)
Kubernetes is popular, open and growing
To those of us building platforms, Kubernetes offers
Reliable cluster & workload management
A stack agnostic hosting abstraction
(Docker)
Battle-tested fundamental abstractions that
give rise to powerful deployment patterns
Kubernetes Fundamentals
Controllers
Loops that maintain state
Run continuously on Master
Each Kubernetes object gets
its own Controller
Controllers are pluggable &
lightweight
Rely on declarative manifests
to determine intent
The Pod
Many containers, working together as a single unit
Shared IP & localhost
Shared filesystem
Scale together
Separate hardware limits
Can be tagged with a label,
providing scheduling advice
Services
Permanent, logical addresses for internal services
Expose a name, port and stable IP for a
group of pods
Load balance between individual pods
Provided to pods via DNS or
environment variable
Constructed using a selector onto pod
labels (sort of like a database query)
Networking
Rules for all Kubernetes installations
Each Pod gets its own unique IP
address (which is the same outside and
in)
All Pods must be able to communicate
with each other without NAT
All Pods must be able to communicate
with and participate in Services
Ingress
Simplifies Layer 7 access to Kubernetes services
Works with load balancers, including
cloud load balancers & nginx
Presents a single root URL mapping to
multiple services
Publicly expose private networks
Terminates TLS/SSL
Using the fundamentals to
build a platform
Pod patterns from Burns & Oppenheimer, USENIX 2016
How can my platform provide availability
during workload releases?
Rolling Deployments
Rolling Deployments
Rolling Deployments
Rolling Deployments
How can my platform non-destructively
add functionality to a workload?
Sidecars
How can my platform insulate workloads
from complexity and state of services?
Ambassador
How can my platform communicate with
a workload when I want a different
protocol than it was built with?
Adapter
How can my platform provide “singleton”
behaviors in a scaled-out service?
Leader Elector
How can my platform provide “work
queue” behavior without altering a
workload?
Work Queue
Kubernetes Tweet Bait
“Could this be POSIX of distributed systems?!”
How does it all come together?
Scalewhale: A troubled service
The output we want… … but we get overloaded
Initial rollout
Brute force scale-out
Metric-driven Autoscale
Swap in a work queue!
Questions
Get hip to the heptagon
A platform is a real developer advantage but must avoid reinvention and being
overly proscriptive.
Kubernetes was built to bring independence from hardware choices.
Kubernetes also brings separation of concerns to dev teams.
It’s built from simple rules and objects that improve the usefulness and portability
of containers.
Slides available at
https://is.gd/k8splatform
Bibliography
“Design Patterns for Container-base Distributed Systems” -- Burns, Oppenheimer
USENIX 2016
“Site Reliability Engineering” -- Beyer, Jones, Petoff, Murphy. O’Reilly 2016
“From Google to the World: The Kubernetes Origin Story” -- McLuckie, 2016
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
microservices-kubernetes

Weitere ähnliche Inhalte

Mehr von C4Media

Mehr von C4Media (20)

Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaDoes Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
 
Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate Guide
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven Utopia
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Building a Microservices Platform with Kubernetes

  • 1. Building a Microservices Platform with Kubernetes Matthew Mark Miller @DataMiller
  • 2. InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ microservices-kubernetes
  • 3. Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide Presented at QCon San Francisco www.qconsf.com
  • 4. Cloud Native: Microservices running inside Containers on top of Platforms on any infrastructure
  • 5. Microservice A software component of a system that is independently releasable and independently scalable from other parts of the system.
  • 6. Container A software process whose access has been reduced to the point that it thinks it is the only thing running.
  • 7. Platform The parts of your service that you don't build yourself.
  • 8. But wait...aren’t we supposed to be Full Stack?!
  • 9.
  • 10.
  • 11. A platform’s responsibility is to make implicit the link between a service and the resource it consumes.
  • 12.
  • 13.
  • 14. Clouds operate because of workload orchestration
  • 15. Don’t roll your own orchestration.
  • 16. Integrating workloads requires tinkering at runtime Token swapping Modifications to the host container’s configuration Swapping in binaries
  • 17. Integrating this way isn’t easy Takes time & testing to get it right What you built and tested isn’t necessarily what runs in production. Leads to providers offering fewer, more highly opinionated stacks
  • 18. A big question for platform engineers: How can we spend more time building useful services and less time maintaining the platform?
  • 19.
  • 20.
  • 21. Kubernetes Borg meets Docker; Resistance is futile
  • 22.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28. Kubernetes is popular, open and growing
  • 29. To those of us building platforms, Kubernetes offers Reliable cluster & workload management A stack agnostic hosting abstraction (Docker) Battle-tested fundamental abstractions that give rise to powerful deployment patterns
  • 31. Controllers Loops that maintain state Run continuously on Master Each Kubernetes object gets its own Controller Controllers are pluggable & lightweight Rely on declarative manifests to determine intent
  • 32. The Pod Many containers, working together as a single unit Shared IP & localhost Shared filesystem Scale together Separate hardware limits Can be tagged with a label, providing scheduling advice
  • 33. Services Permanent, logical addresses for internal services Expose a name, port and stable IP for a group of pods Load balance between individual pods Provided to pods via DNS or environment variable Constructed using a selector onto pod labels (sort of like a database query)
  • 34. Networking Rules for all Kubernetes installations Each Pod gets its own unique IP address (which is the same outside and in) All Pods must be able to communicate with each other without NAT All Pods must be able to communicate with and participate in Services
  • 35. Ingress Simplifies Layer 7 access to Kubernetes services Works with load balancers, including cloud load balancers & nginx Presents a single root URL mapping to multiple services Publicly expose private networks Terminates TLS/SSL
  • 36. Using the fundamentals to build a platform Pod patterns from Burns & Oppenheimer, USENIX 2016
  • 37. How can my platform provide availability during workload releases?
  • 42. How can my platform non-destructively add functionality to a workload?
  • 44. How can my platform insulate workloads from complexity and state of services?
  • 46. How can my platform communicate with a workload when I want a different protocol than it was built with?
  • 48. How can my platform provide “singleton” behaviors in a scaled-out service?
  • 50. How can my platform provide “work queue” behavior without altering a workload?
  • 52. Kubernetes Tweet Bait “Could this be POSIX of distributed systems?!”
  • 53. How does it all come together?
  • 54. Scalewhale: A troubled service The output we want… … but we get overloaded
  • 58. Swap in a work queue!
  • 60. Get hip to the heptagon A platform is a real developer advantage but must avoid reinvention and being overly proscriptive. Kubernetes was built to bring independence from hardware choices. Kubernetes also brings separation of concerns to dev teams. It’s built from simple rules and objects that improve the usefulness and portability of containers.
  • 62. Bibliography “Design Patterns for Container-base Distributed Systems” -- Burns, Oppenheimer USENIX 2016 “Site Reliability Engineering” -- Beyer, Jones, Petoff, Murphy. O’Reilly 2016 “From Google to the World: The Kubernetes Origin Story” -- McLuckie, 2016
  • 63. Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ microservices-kubernetes