SlideShare uma empresa Scribd logo
1 de 44
Baixar para ler offline
The Elements of Kubernetes
Aaron Schlesinger
Microsoft Azure Containers
Lead, SIG-Service-Catalog
★ Kubernetes is growing fast
★ Usage, development, projects
★ We’re in the wild west
Why we’re here
Building an app for Kubernetes
Dev/Test Containerize CI/CD
Staging Pre-prod Prod
ResilienceMonitoring Tracing Logging Observability
Lots to figure out
No one size fits all
We need a “north star” for people
building cloud-native apps
★ Help app operators/developers decide what to do
★ Stand up to rapid technology changes
★ Guide SIGs
Best practices, not rules
North Star
What we have now
★ Opinions
★ Evidence
★ Fragmentation
I’ve seen the good & the bad
I’m here to propose ideas
Observability is golden
★ Kubernetes schedules containers
★ Kubernetes observes containers
★ You observe containers
Observability is golden
★ Resource limits
★ Readiness & liveness checks
★ HPA
Kubernetes observing your app
You observing your app
Adopt a rich ecosystem of cloud native tools:
★ Logging
★ Service mesh
★ Tracing
When all else fails, crash
Crash-only software
★ You’ll have bugs, network outages, disk issues, etc...
★ Kubernetes is your retry loop
What that might look like
★ Your app connects to a DB on startup
★ App fails to connect, crashes
★ Tracing sees the conn. failure
★ Kubernetes restarts it
★ Monitoring, log aggregation pick up the restart
★ Alerting notifies if too many restarts
★ ...
Unordered is better than
ordered
★ Kubernetes & your app are distributed systems
★ Ordering is very hard in distributed systems
★ Try not to rely on ordering
Unordered is better than ordered
Use Kubernetes primitives.
★ Sidecar for locks, leader election
★ Resource versions in Kubernetes resources
★ Init containers (can be messy)
But sometimes you need it
Loose coupling is better than
tight coupling
Loose coupling is better than tight
★ Kubernetes is always watching
★ Your app should tolerate dynamism
What that might look like
★ Pod => Pod messaging via Services
★ Crash if you can’t connect (crash-only)
★ Look for Kube resources via labels, not names
… But tight coupling isn’t
always wrong
★ Pods have >1 containers on purpose
★ Run tightly coupled containers in a pod
Tight coupling isn’t always wrong
★ Envoy
★ Fluentd logging driver
★ Metrics
What that might look like
Record your configuration
Record your configuration
★ Kubernetes APIs are declarative
★ Keep the latest working configuration in your repository
★ Let Kubernetes reconcile
What might that look like
Ask for the least
Ask for the least
If you’re:
★ Configuring RBAC permissions
★ Configuring containers in a pod
★ Asking for CPU shares or memory
★ Asking for disk space with a PersistentVolumeClaim
Ask for the fewest possible of them. Leave more for Kubernetes
What that might look like
★ Read-only permissions for your monitoring system
★ One CPU share for each web frontend
★ Minimal disk for your log aggregator
★ Tiny memory for your local proxy
Build on the shoulders of
giants
Build on the shoulders of giants
★ Kubernetes provides a big API
○ … to abstract functionality that’s hard to get right
★ Maybe the community doesn’t do what you need
○ … but try to find the next best thing and build atop
What that might look like
Helm for managing your app lifecycle
★ Or the Helm API (which is gRPC)
Traefik for Ingress
★ Or Traefik => service mesh => your app
Fluentd for Logging
★ Or app => local translator => fluentd
Parting thoughts: where
should we go from here?
Who should define our guidelines?
★ I’ve started the conversation here
★ We all have a wealth of experience
★ We need to share it
We need your thoughts
https://github.com/arschles/kube-best-practices
Thank you
aaron.schlesinger@microsoft.com
@arschles
github.com/arschles
Community Extras
Pay it forward
Pay it forward
★ If you “build on the shoulders of giants,” open source it
★ You’ll be moving cloud native forward
★ We’ll progress as community & concept because of your work
Disagree constructively
★ Cloud native is young
★ If you disagree with a choice, others do too
★ Make your voice heard, and offer solutions
Disagree constructively

Mais conteúdo relacionado

Mais procurados

Netflix0SS Services on Docker
Netflix0SS Services on DockerNetflix0SS Services on Docker
Netflix0SS Services on Docker
Docker, Inc.
 

Mais procurados (20)

OpenStack on Kubernetes (BOS Summit / May 2017 update)
OpenStack on Kubernetes (BOS Summit / May 2017 update)OpenStack on Kubernetes (BOS Summit / May 2017 update)
OpenStack on Kubernetes (BOS Summit / May 2017 update)
 
Netflix Open Source: Building a Distributed and Automated Open Source Program
Netflix Open Source:  Building a Distributed and Automated Open Source ProgramNetflix Open Source:  Building a Distributed and Automated Open Source Program
Netflix Open Source: Building a Distributed and Automated Open Source Program
 
Sf bay area Kubernetes meetup dec8 2016 - deployment models
Sf bay area Kubernetes meetup dec8 2016 - deployment modelsSf bay area Kubernetes meetup dec8 2016 - deployment models
Sf bay area Kubernetes meetup dec8 2016 - deployment models
 
Infrastructure as Code with Ansible
Infrastructure as Code with AnsibleInfrastructure as Code with Ansible
Infrastructure as Code with Ansible
 
Setup Hybrid Clusters Using Kubernetes Federation
Setup Hybrid Clusters Using Kubernetes FederationSetup Hybrid Clusters Using Kubernetes Federation
Setup Hybrid Clusters Using Kubernetes Federation
 
StarlingX - A Platform for the Distributed Edge | Ildiko Vancsa
StarlingX - A Platform for the Distributed Edge | Ildiko VancsaStarlingX - A Platform for the Distributed Edge | Ildiko Vancsa
StarlingX - A Platform for the Distributed Edge | Ildiko Vancsa
 
Develop and Deploy Cloud-Native Apps as Resilient Microservice Architectures
Develop and Deploy Cloud-Native Apps as Resilient Microservice ArchitecturesDevelop and Deploy Cloud-Native Apps as Resilient Microservice Architectures
Develop and Deploy Cloud-Native Apps as Resilient Microservice Architectures
 
Clocker, Calico and Docker
Clocker, Calico and DockerClocker, Calico and Docker
Clocker, Calico and Docker
 
實際架構實踐演化與解決方案
實際架構實踐演化與解決方案實際架構實踐演化與解決方案
實際架構實踐演化與解決方案
 
ContainerDays NYC 2015: "Container Orchestration Compared: Kubernetes and Doc...
ContainerDays NYC 2015: "Container Orchestration Compared: Kubernetes and Doc...ContainerDays NYC 2015: "Container Orchestration Compared: Kubernetes and Doc...
ContainerDays NYC 2015: "Container Orchestration Compared: Kubernetes and Doc...
 
Proactive ops for container orchestration environments
Proactive ops for container orchestration environmentsProactive ops for container orchestration environments
Proactive ops for container orchestration environments
 
An Overview of Spinnaker
An Overview of SpinnakerAn Overview of Spinnaker
An Overview of Spinnaker
 
Kube Apps in action
Kube Apps in actionKube Apps in action
Kube Apps in action
 
DockerCon EU 2015: Deploying and Managing Containers for Developers
DockerCon EU 2015: Deploying and Managing Containers for DevelopersDockerCon EU 2015: Deploying and Managing Containers for Developers
DockerCon EU 2015: Deploying and Managing Containers for Developers
 
Hystrix
HystrixHystrix
Hystrix
 
KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016
 
Building your production tech stack for docker container platform
Building your production tech stack for docker container platformBuilding your production tech stack for docker container platform
Building your production tech stack for docker container platform
 
Experiences with AWS immutable deploys and job processing
Experiences with AWS immutable deploys and job processingExperiences with AWS immutable deploys and job processing
Experiences with AWS immutable deploys and job processing
 
Terrascan - Cloud Native Security Tool
Terrascan - Cloud Native Security Tool Terrascan - Cloud Native Security Tool
Terrascan - Cloud Native Security Tool
 
Netflix0SS Services on Docker
Netflix0SS Services on DockerNetflix0SS Services on Docker
Netflix0SS Services on Docker
 

Semelhante a The elements of kubernetes

Semelhante a The elements of kubernetes (20)

The Road to Kubernetes
The Road to KubernetesThe Road to Kubernetes
The Road to Kubernetes
 
The ABC's of IaC
The ABC's of IaCThe ABC's of IaC
The ABC's of IaC
 
Greenfields tech decisions
Greenfields tech decisionsGreenfields tech decisions
Greenfields tech decisions
 
Why do we even have Kubernetes?
Why do we even have Kubernetes?Why do we even have Kubernetes?
Why do we even have Kubernetes?
 
MongoDB Ops Manager and Kubernetes - James Broadhead
MongoDB Ops Manager and Kubernetes - James BroadheadMongoDB Ops Manager and Kubernetes - James Broadhead
MongoDB Ops Manager and Kubernetes - James Broadhead
 
Taking Docker to Production: What You Need to Know and Decide
Taking Docker to Production: What You Need to Know and DecideTaking Docker to Production: What You Need to Know and Decide
Taking Docker to Production: What You Need to Know and Decide
 
Taking Docker to Production: What You Need to Know and Decide
Taking Docker to Production: What You Need to Know and DecideTaking Docker to Production: What You Need to Know and Decide
Taking Docker to Production: What You Need to Know and Decide
 
Idi2018 - Serverless does not mean Opsless
Idi2018 - Serverless does not mean OpslessIdi2018 - Serverless does not mean Opsless
Idi2018 - Serverless does not mean Opsless
 
Introduction to OpenStack Storage
Introduction to OpenStack StorageIntroduction to OpenStack Storage
Introduction to OpenStack Storage
 
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
 
Lattice yapc-slideshare
Lattice yapc-slideshareLattice yapc-slideshare
Lattice yapc-slideshare
 
reBuy on Kubernetes
reBuy on KubernetesreBuy on Kubernetes
reBuy on Kubernetes
 
Working with microservices and Amazon ECS at Airtime
Working with microservices and Amazon ECS at AirtimeWorking with microservices and Amazon ECS at Airtime
Working with microservices and Amazon ECS at Airtime
 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
 
Docker in Production at the Aurora Team
Docker in Production at the Aurora TeamDocker in Production at the Aurora Team
Docker in Production at the Aurora Team
 
DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.
 
Serverless
ServerlessServerless
Serverless
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Control
 
Kubernetes lessons learned
Kubernetes lessons learnedKubernetes lessons learned
Kubernetes lessons learned
 
OpenStack Cinder Best Practices - Meet Up
OpenStack Cinder Best Practices - Meet UpOpenStack Cinder Best Practices - Meet Up
OpenStack Cinder Best Practices - Meet Up
 

Mais de Aaron Schlesinger

Mais de Aaron Schlesinger (6)

I Can Haz Services ??
I Can Haz Services ??I Can Haz Services ??
I Can Haz Services ??
 
Functional Programming in Go
Functional Programming in GoFunctional Programming in Go
Functional Programming in Go
 
Concurrency patterns
Concurrency patternsConcurrency patterns
Concurrency patterns
 
Why you should care about Go (Golang)
Why you should care about Go (Golang)Why you should care about Go (Golang)
Why you should care about Go (Golang)
 
Go - Where it's going and why you should pay attention.
Go - Where it's going and why you should pay attention.Go - Where it's going and why you should pay attention.
Go - Where it's going and why you should pay attention.
 
OSCON 2014 - The Epic Battle: Scala at PayPal
OSCON 2014 - The Epic Battle: Scala at PayPalOSCON 2014 - The Epic Battle: Scala at PayPal
OSCON 2014 - The Epic Battle: Scala at PayPal
 

Último

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Último (20)

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 

The elements of kubernetes

  • 1. The Elements of Kubernetes Aaron Schlesinger Microsoft Azure Containers Lead, SIG-Service-Catalog
  • 2. ★ Kubernetes is growing fast ★ Usage, development, projects ★ We’re in the wild west Why we’re here
  • 3. Building an app for Kubernetes Dev/Test Containerize CI/CD Staging Pre-prod Prod ResilienceMonitoring Tracing Logging Observability
  • 4. Lots to figure out No one size fits all
  • 5. We need a “north star” for people building cloud-native apps
  • 6. ★ Help app operators/developers decide what to do ★ Stand up to rapid technology changes ★ Guide SIGs Best practices, not rules North Star
  • 7. What we have now ★ Opinions ★ Evidence ★ Fragmentation
  • 8. I’ve seen the good & the bad
  • 9. I’m here to propose ideas
  • 11. ★ Kubernetes schedules containers ★ Kubernetes observes containers ★ You observe containers Observability is golden
  • 12. ★ Resource limits ★ Readiness & liveness checks ★ HPA Kubernetes observing your app
  • 13. You observing your app Adopt a rich ecosystem of cloud native tools: ★ Logging ★ Service mesh ★ Tracing
  • 14. When all else fails, crash
  • 15. Crash-only software ★ You’ll have bugs, network outages, disk issues, etc... ★ Kubernetes is your retry loop
  • 16. What that might look like ★ Your app connects to a DB on startup ★ App fails to connect, crashes ★ Tracing sees the conn. failure ★ Kubernetes restarts it ★ Monitoring, log aggregation pick up the restart ★ Alerting notifies if too many restarts ★ ...
  • 17. Unordered is better than ordered
  • 18. ★ Kubernetes & your app are distributed systems ★ Ordering is very hard in distributed systems ★ Try not to rely on ordering Unordered is better than ordered
  • 19. Use Kubernetes primitives. ★ Sidecar for locks, leader election ★ Resource versions in Kubernetes resources ★ Init containers (can be messy) But sometimes you need it
  • 20. Loose coupling is better than tight coupling
  • 21. Loose coupling is better than tight ★ Kubernetes is always watching ★ Your app should tolerate dynamism
  • 22. What that might look like ★ Pod => Pod messaging via Services ★ Crash if you can’t connect (crash-only) ★ Look for Kube resources via labels, not names
  • 23. … But tight coupling isn’t always wrong
  • 24. ★ Pods have >1 containers on purpose ★ Run tightly coupled containers in a pod Tight coupling isn’t always wrong
  • 25. ★ Envoy ★ Fluentd logging driver ★ Metrics What that might look like
  • 27. Record your configuration ★ Kubernetes APIs are declarative ★ Keep the latest working configuration in your repository ★ Let Kubernetes reconcile
  • 28. What might that look like
  • 29. Ask for the least
  • 30. Ask for the least If you’re: ★ Configuring RBAC permissions ★ Configuring containers in a pod ★ Asking for CPU shares or memory ★ Asking for disk space with a PersistentVolumeClaim Ask for the fewest possible of them. Leave more for Kubernetes
  • 31. What that might look like ★ Read-only permissions for your monitoring system ★ One CPU share for each web frontend ★ Minimal disk for your log aggregator ★ Tiny memory for your local proxy
  • 32. Build on the shoulders of giants
  • 33. Build on the shoulders of giants ★ Kubernetes provides a big API ○ … to abstract functionality that’s hard to get right ★ Maybe the community doesn’t do what you need ○ … but try to find the next best thing and build atop
  • 34. What that might look like Helm for managing your app lifecycle ★ Or the Helm API (which is gRPC) Traefik for Ingress ★ Or Traefik => service mesh => your app Fluentd for Logging ★ Or app => local translator => fluentd
  • 35. Parting thoughts: where should we go from here?
  • 36. Who should define our guidelines? ★ I’ve started the conversation here ★ We all have a wealth of experience ★ We need to share it
  • 37.
  • 38. We need your thoughts https://github.com/arschles/kube-best-practices
  • 42. Pay it forward ★ If you “build on the shoulders of giants,” open source it ★ You’ll be moving cloud native forward ★ We’ll progress as community & concept because of your work
  • 44. ★ Cloud native is young ★ If you disagree with a choice, others do too ★ Make your voice heard, and offer solutions Disagree constructively