SlideShare a Scribd company logo
The Kubernetes Effect
by @bibryam
Who am I?
➢ Bilgin Ibryam
➢ @bibryam
➢ http://ofbizian.com/
➢ http://github.com/bibryam/
➢
Integration Architect at Red Hat
➢ Committer for Camel, OFBiz, Isis at ASF
➢ Author of Camel Design Patterns, Kubernetes Patterns
➢ Interested in Integration, Cloud Native, Blockchain
Agenda
Cloud native...
A common defnition:
Cloud Native is structuring
teams, culture and technology
to utilize automation and architectures
to manage complexity and unlock velocity.
@jbeda
A typical application:
Applications adopting the principles of
microservices packaged as
containers orchestrated by
platforms running on top of
cloud infrastructure.
A Kubernetes based microservice
Local vs distributed primitives
Distributed abstractions and primitives
● Application packaging (Container)
● Deployment unit (Pod)
● Auto scaling (HPA)
● Atomic work unit (Job)
● Recurring execution (CronJob)
● Service discovery (Service)
● Load balancing (Service)
● Application placement (Scheduler)
● Lifecycle management (Deployment)
● Health checks (liveness/readiness)
● Lifecycle hooks (PostStart/PreStop)
● Artifact grouping (Label)
● Custom Resource Defnition (CRD)
Software design principles
● KISS - Keep it simple, stupid
● DRY - Don't repeat yourself
● YAGNI - You aren't gonna need it
● SoC - Separation of concerns
● SOLID Principles by Robert C. Martin:
• Single responsibility
• Open/Closed
• Liskov substitution
• Interface segregation
• Dependency inversion
Principles represent abstract guidelines or believes that help create systems with higher-quality attributes.
The twelve-factor app i.e. the Heroku way
1. One codebase tracked in revision control, many deploys
2. Explicitly declare and isolate dependencies
3. Store confg in the environment
4. Treat backing services as attached resources
5. Strictly separate build and run stages
6. Execute the app as one or more stateless processes
7. Export services via port binding
8. Scale out via the process model
9. Maximize robustness with fast startup and graceful shutdown
10.Keep development, staging, and production as similar as possible
11. Treat logs as event streams
12.Run admin/management tasks as one-off processes
Principles of container-based application design
● Build time:
● Single Concern Principle (SCP)
● Self-Containment Principle (S-CP)
● Image Immutability Principle (IIP)
● Runtime:
● High Observability Principle (HOP)
● Lifecycle Conformance Principle (LCP)
● Process Disposability Principle (PDP)
● Runtime Confnement Principle (RCP)
https://www.redhat.com/en/resources/cloud-native-container-design-whitepaper
Single concern principle
Design patterns:
• Sidecar
• Ambassador
• Adapter
• Init-container
• Defer-container
Self-containment principle
Anti-patterns:
• Locomotive
Image immutability principle
Also known as:
• Dev/Prod parity
• Snowflakes vs Phoenix
• Impedance mismatch
High observability principle
Healthcheck implementations:
• Spring Boot Actuator
• Dropwizard Metrics
• WildFly Swarm Monitor
• MicroProfle Healthchecks
• Apache Camel
• And many others!
Lifecycle conformance principle
● Graceful shutdown:
● SIGTERM
● SIGKILL
● Lifecycle hooks:
● PreStop
● PostStart
Process disposability principle
Also known as:
● Cattle rather than pets
● Don’t rely on a particular instance.
● Be aware of shots at your cattle.
● Be robust against sudden death.
● Stateless or with replicated state
● Idempotent startup
● Graceful shutdown
Runtime confnement principle
Implications:
● Pod scheduling
● Pod auto scaling
● Pod eviction
● Pod QoS classes:
● Best Effort
● Burstable
● Guaranteed
● Capacity management
Agenda
Software design patterns
Object-oriented patterns Container orchestration patterns
A reusable solution to a reoccurring problem within a given context.
Container design patterns
Sidecar pattern
● Use cases
● Monitoring, health checks, watchdog
● Logging
● Confguration
● Networking
● Offload proxy
The Kubernetes Effect
Specialized Sidecars
Ambassador Pattern
Proxy Pattern
● Use cases
● Reverse proxy to a heterogeneous system
● Log normalizer
● Metrics exporter
● Use cases
● Out-of-process proxy
● Resiliency
● Monitoring
● Security
Init-container pattern
● Use cases
● Wait for external dependency
● Confguration
● Initialization
The Kubernetes Effect
More Kubernetes Patterns
Confguration Patterns
● EnvVar Confguration
● Confguration Resource
● Confguration Template
● Immutable Confguration
Advanced Patterns
● Stateful Service
● Custom Resource Descriptors
● Custom Controller
● Build Container
Immutable confguration pattern
● Use cases
● Immutable confguration data
● Large confguration fles
Confguration template pattern
● Use cases
● Complex templating logic
Custom controller/Operator patterns
Application Controller
●
Prometheus operator
●
Zookeeper operator
●
Infnspan operator
●
Strimzi - Kafka operator
Extension controllers
●
Expose controller (fabric8)
●
Confgmap controller (fabric8)
●
Linux Update Operator
Techniques and practices
• Aim for small images - this reduces container size, improves build, and deployment time.
• Support arbitrary user IDs - avoid using the sudo command or requiring a specifc user ID.
• Mark important ports - declare ports using the EXPOSE command.
• Use volumes for persistent data - the data that needs to be preserved after a container is destroyed.
• Set image metadata - Image metadata in the form of tags, labels, and annotations.
• Synchronize host and image - attributes such as time and machine ID.
• Log to STDOUT and STDERR - to ensure container logs are picked up and aggregated properly.
Agenda
Kubernetes resources
●
The Kubernetes Effect (blog post)
https://www.infoq.com/articles/kubernetes-effect
●
Principles of container-based application design (white paper)
https://www.redhat.com/en/resources/cloud-native-container-design-whitepaper
●
Design patterns for container-based distributed systems (white paper)
https://www.usenix.org/system/fles/conference/hotcloud16/hotcloud16_burns.pdf
●
Designing Distributed Systems (free ebook)
https://azure.microsoft.com/en-us/resources/designing-distributed-systems
●
Kubernetes Patterns (ebook)
https://leanpub.com/k8spatterns
●
Kubernetes in Action (ebook)
https://www.manning.com/books/kubernetes-in-action
Q & A
Ad

More Related Content

What's hot (20)

The evolving container landscape
The evolving container landscapeThe evolving container landscape
The evolving container landscape
Nilesh Trivedi
 
RedisConf18 - Redis Cluster Provisioning with Kubernetes Service-Catalog Exte...
RedisConf18 - Redis Cluster Provisioning with Kubernetes Service-Catalog Exte...RedisConf18 - Redis Cluster Provisioning with Kubernetes Service-Catalog Exte...
RedisConf18 - Redis Cluster Provisioning with Kubernetes Service-Catalog Exte...
Redis Labs
 
Introduction to Container Storage Interface (CSI)
Introduction to Container Storage Interface (CSI)Introduction to Container Storage Interface (CSI)
Introduction to Container Storage Interface (CSI)
Idan Atias
 
[WSO2Con USA 2018] Deploying Applications in K8S and Docker
[WSO2Con USA 2018] Deploying Applications in K8S and Docker[WSO2Con USA 2018] Deploying Applications in K8S and Docker
[WSO2Con USA 2018] Deploying Applications in K8S and Docker
WSO2
 
Getting Started with Kafka on k8s
Getting Started with Kafka on k8sGetting Started with Kafka on k8s
Getting Started with Kafka on k8s
VMware Tanzu
 
RedisConf18 - Designing a Redis Client for Humans
RedisConf18 - Designing a Redis Client for Humans RedisConf18 - Designing a Redis Client for Humans
RedisConf18 - Designing a Redis Client for Humans
Redis Labs
 
19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world
19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world
19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world
Dávid Kőszeghy
 
Kubera Launch Webinar: Kubernetes native management of Kubernetes native data
Kubera Launch Webinar: Kubernetes native management of Kubernetes native dataKubera Launch Webinar: Kubernetes native management of Kubernetes native data
Kubera Launch Webinar: Kubernetes native management of Kubernetes native data
MayaData Inc
 
Dynomite @ RedisConf 2017
Dynomite @ RedisConf 2017Dynomite @ RedisConf 2017
Dynomite @ RedisConf 2017
Ioannis Papapanagiotou
 
Build Robust Blockchain Services with Hyperledger and Containers
Build Robust Blockchain Services with Hyperledger and ContainersBuild Robust Blockchain Services with Hyperledger and Containers
Build Robust Blockchain Services with Hyperledger and Containers
LinuxCon ContainerCon CloudOpen China
 
Kubernetes + netflix oss
Kubernetes + netflix ossKubernetes + netflix oss
Kubernetes + netflix oss
Cristiano Altmann
 
[Lakmal] Automate Microservice to API
[Lakmal] Automate Microservice to API[Lakmal] Automate Microservice to API
[Lakmal] Automate Microservice to API
Lakmal Warusawithana
 
DockerCon SF 2015: The Distributed System Toolkit
DockerCon SF 2015: The Distributed System ToolkitDockerCon SF 2015: The Distributed System Toolkit
DockerCon SF 2015: The Distributed System Toolkit
Docker, Inc.
 
Creating a Kubernetes Operator in Java
Creating a Kubernetes Operator in JavaCreating a Kubernetes Operator in Java
Creating a Kubernetes Operator in Java
Rudy De Busscher
 
RedisConf18 - Video Experience Operational Insights in Real Time.
RedisConf18 - Video Experience Operational Insights in Real Time.RedisConf18 - Video Experience Operational Insights in Real Time.
RedisConf18 - Video Experience Operational Insights in Real Time.
Redis Labs
 
7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic
Kangaroot
 
MesosCon 2016 - minimesos, the experimentation and testing tool for Apache Mesos
MesosCon 2016 - minimesos, the experimentation and testing tool for Apache MesosMesosCon 2016 - minimesos, the experimentation and testing tool for Apache Mesos
MesosCon 2016 - minimesos, the experimentation and testing tool for Apache Mesos
Container Solutions
 
5 - Hands-on Kubernetes Workshop:
5 - Hands-on Kubernetes Workshop:5 - Hands-on Kubernetes Workshop:
5 - Hands-on Kubernetes Workshop:
Kangaroot
 
On Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons LearnedOn Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons Learned
CodeOps Technologies LLP
 
OSDC 2018 | The operational brain: how new Paradigms like Machine Learning ar...
OSDC 2018 | The operational brain: how new Paradigms like Machine Learning ar...OSDC 2018 | The operational brain: how new Paradigms like Machine Learning ar...
OSDC 2018 | The operational brain: how new Paradigms like Machine Learning ar...
NETWAYS
 
The evolving container landscape
The evolving container landscapeThe evolving container landscape
The evolving container landscape
Nilesh Trivedi
 
RedisConf18 - Redis Cluster Provisioning with Kubernetes Service-Catalog Exte...
RedisConf18 - Redis Cluster Provisioning with Kubernetes Service-Catalog Exte...RedisConf18 - Redis Cluster Provisioning with Kubernetes Service-Catalog Exte...
RedisConf18 - Redis Cluster Provisioning with Kubernetes Service-Catalog Exte...
Redis Labs
 
Introduction to Container Storage Interface (CSI)
Introduction to Container Storage Interface (CSI)Introduction to Container Storage Interface (CSI)
Introduction to Container Storage Interface (CSI)
Idan Atias
 
[WSO2Con USA 2018] Deploying Applications in K8S and Docker
[WSO2Con USA 2018] Deploying Applications in K8S and Docker[WSO2Con USA 2018] Deploying Applications in K8S and Docker
[WSO2Con USA 2018] Deploying Applications in K8S and Docker
WSO2
 
Getting Started with Kafka on k8s
Getting Started with Kafka on k8sGetting Started with Kafka on k8s
Getting Started with Kafka on k8s
VMware Tanzu
 
RedisConf18 - Designing a Redis Client for Humans
RedisConf18 - Designing a Redis Client for Humans RedisConf18 - Designing a Redis Client for Humans
RedisConf18 - Designing a Redis Client for Humans
Redis Labs
 
19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world
19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world
19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world
Dávid Kőszeghy
 
Kubera Launch Webinar: Kubernetes native management of Kubernetes native data
Kubera Launch Webinar: Kubernetes native management of Kubernetes native dataKubera Launch Webinar: Kubernetes native management of Kubernetes native data
Kubera Launch Webinar: Kubernetes native management of Kubernetes native data
MayaData Inc
 
[Lakmal] Automate Microservice to API
[Lakmal] Automate Microservice to API[Lakmal] Automate Microservice to API
[Lakmal] Automate Microservice to API
Lakmal Warusawithana
 
DockerCon SF 2015: The Distributed System Toolkit
DockerCon SF 2015: The Distributed System ToolkitDockerCon SF 2015: The Distributed System Toolkit
DockerCon SF 2015: The Distributed System Toolkit
Docker, Inc.
 
Creating a Kubernetes Operator in Java
Creating a Kubernetes Operator in JavaCreating a Kubernetes Operator in Java
Creating a Kubernetes Operator in Java
Rudy De Busscher
 
RedisConf18 - Video Experience Operational Insights in Real Time.
RedisConf18 - Video Experience Operational Insights in Real Time.RedisConf18 - Video Experience Operational Insights in Real Time.
RedisConf18 - Video Experience Operational Insights in Real Time.
Redis Labs
 
7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic
Kangaroot
 
MesosCon 2016 - minimesos, the experimentation and testing tool for Apache Mesos
MesosCon 2016 - minimesos, the experimentation and testing tool for Apache MesosMesosCon 2016 - minimesos, the experimentation and testing tool for Apache Mesos
MesosCon 2016 - minimesos, the experimentation and testing tool for Apache Mesos
Container Solutions
 
5 - Hands-on Kubernetes Workshop:
5 - Hands-on Kubernetes Workshop:5 - Hands-on Kubernetes Workshop:
5 - Hands-on Kubernetes Workshop:
Kangaroot
 
OSDC 2018 | The operational brain: how new Paradigms like Machine Learning ar...
OSDC 2018 | The operational brain: how new Paradigms like Machine Learning ar...OSDC 2018 | The operational brain: how new Paradigms like Machine Learning ar...
OSDC 2018 | The operational brain: how new Paradigms like Machine Learning ar...
NETWAYS
 

Similar to The Kubernetes Effect (20)

Cloud Native Camel Design Patterns
Cloud Native Camel Design PatternsCloud Native Camel Design Patterns
Cloud Native Camel Design Patterns
Bilgin Ibryam
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
NETWAYS
 
Kubernetes – An open platform for container orchestration
Kubernetes – An open platform for container orchestrationKubernetes – An open platform for container orchestration
Kubernetes – An open platform for container orchestration
inovex GmbH
 
Migrating from oracle soa suite to microservices on kubernetes
Migrating from oracle soa suite to microservices on kubernetesMigrating from oracle soa suite to microservices on kubernetes
Migrating from oracle soa suite to microservices on kubernetes
Konveyor Community
 
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
NETWAYS
 
Cloud-Native: A New Ecosystem for Putting Containers into Production
Cloud-Native:  A New Ecosystem for Putting Containers into ProductionCloud-Native:  A New Ecosystem for Putting Containers into Production
Cloud-Native: A New Ecosystem for Putting Containers into Production
Gordon Haff
 
Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10
MagaliDavidCruz
 
Cloud Native Practice
Cloud Native PracticeCloud Native Practice
Cloud Native Practice
Philip Zheng
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications
OpenEBS
 
DNUG46 - Build your own private Cloud environment
DNUG46 - Build your own private Cloud environmentDNUG46 - Build your own private Cloud environment
DNUG46 - Build your own private Cloud environment
panagenda
 
Build your own private Cloud environment
Build your own private Cloud environmentBuild your own private Cloud environment
Build your own private Cloud environment
Nico Meisenzahl
 
12 Factor App Methodology
12 Factor App Methodology12 Factor App Methodology
12 Factor App Methodology
laeshin park
 
Edge 2016 SCL-2484: a software defined scalable and flexible container manage...
Edge 2016 SCL-2484: a software defined scalable and flexible container manage...Edge 2016 SCL-2484: a software defined scalable and flexible container manage...
Edge 2016 SCL-2484: a software defined scalable and flexible container manage...
Yong Feng
 
The Evolution of Distributed Systems on Kubernetes
The Evolution of Distributed Systems on KubernetesThe Evolution of Distributed Systems on Kubernetes
The Evolution of Distributed Systems on Kubernetes
Bilgin Ibryam
 
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
Haggai Philip Zagury
 
Journey Through Four Stages of Kubernetes Deployment Maturity
Journey Through Four Stages of Kubernetes Deployment MaturityJourney Through Four Stages of Kubernetes Deployment Maturity
Journey Through Four Stages of Kubernetes Deployment Maturity
Altoros
 
reBuy on Kubernetes
reBuy on KubernetesreBuy on Kubernetes
reBuy on Kubernetes
Stephan Lindauer
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
kloia
 
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Mario Ishara Fernando
 
Evolving for Kubernetes
Evolving for KubernetesEvolving for Kubernetes
Evolving for Kubernetes
Chris McEniry
 
Cloud Native Camel Design Patterns
Cloud Native Camel Design PatternsCloud Native Camel Design Patterns
Cloud Native Camel Design Patterns
Bilgin Ibryam
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
NETWAYS
 
Kubernetes – An open platform for container orchestration
Kubernetes – An open platform for container orchestrationKubernetes – An open platform for container orchestration
Kubernetes – An open platform for container orchestration
inovex GmbH
 
Migrating from oracle soa suite to microservices on kubernetes
Migrating from oracle soa suite to microservices on kubernetesMigrating from oracle soa suite to microservices on kubernetes
Migrating from oracle soa suite to microservices on kubernetes
Konveyor Community
 
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
NETWAYS
 
Cloud-Native: A New Ecosystem for Putting Containers into Production
Cloud-Native:  A New Ecosystem for Putting Containers into ProductionCloud-Native:  A New Ecosystem for Putting Containers into Production
Cloud-Native: A New Ecosystem for Putting Containers into Production
Gordon Haff
 
Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10
MagaliDavidCruz
 
Cloud Native Practice
Cloud Native PracticeCloud Native Practice
Cloud Native Practice
Philip Zheng
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications
OpenEBS
 
DNUG46 - Build your own private Cloud environment
DNUG46 - Build your own private Cloud environmentDNUG46 - Build your own private Cloud environment
DNUG46 - Build your own private Cloud environment
panagenda
 
Build your own private Cloud environment
Build your own private Cloud environmentBuild your own private Cloud environment
Build your own private Cloud environment
Nico Meisenzahl
 
12 Factor App Methodology
12 Factor App Methodology12 Factor App Methodology
12 Factor App Methodology
laeshin park
 
Edge 2016 SCL-2484: a software defined scalable and flexible container manage...
Edge 2016 SCL-2484: a software defined scalable and flexible container manage...Edge 2016 SCL-2484: a software defined scalable and flexible container manage...
Edge 2016 SCL-2484: a software defined scalable and flexible container manage...
Yong Feng
 
The Evolution of Distributed Systems on Kubernetes
The Evolution of Distributed Systems on KubernetesThe Evolution of Distributed Systems on Kubernetes
The Evolution of Distributed Systems on Kubernetes
Bilgin Ibryam
 
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
Haggai Philip Zagury
 
Journey Through Four Stages of Kubernetes Deployment Maturity
Journey Through Four Stages of Kubernetes Deployment MaturityJourney Through Four Stages of Kubernetes Deployment Maturity
Journey Through Four Stages of Kubernetes Deployment Maturity
Altoros
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
kloia
 
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Mario Ishara Fernando
 
Evolving for Kubernetes
Evolving for KubernetesEvolving for Kubernetes
Evolving for Kubernetes
Chris McEniry
 
Ad

More from Bilgin Ibryam (7)

Dapr - A 10x Developer Framework for Any Language
Dapr - A 10x Developer Framework for Any LanguageDapr - A 10x Developer Framework for Any Language
Dapr - A 10x Developer Framework for Any Language
Bilgin Ibryam
 
Modernization patterns to refactor a legacy application into event driven mic...
Modernization patterns to refactor a legacy application into event driven mic...Modernization patterns to refactor a legacy application into event driven mic...
Modernization patterns to refactor a legacy application into event driven mic...
Bilgin Ibryam
 
Application modernization patterns with apache kafka, debezium, and kubernete...
Application modernization patterns with apache kafka, debezium, and kubernete...Application modernization patterns with apache kafka, debezium, and kubernete...
Application modernization patterns with apache kafka, debezium, and kubernete...
Bilgin Ibryam
 
Dual write strategies for microservices
Dual write strategies for microservicesDual write strategies for microservices
Dual write strategies for microservices
Bilgin Ibryam
 
How to financially survive while growing a small open source project
How to financially survive while growing a small open source projectHow to financially survive while growing a small open source project
How to financially survive while growing a small open source project
Bilgin Ibryam
 
Enterprise Integration for Ethereum
Enterprise Integration for EthereumEnterprise Integration for Ethereum
Enterprise Integration for Ethereum
Bilgin Ibryam
 
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
Camel Desing Patterns Learned Through Blood, Sweat, and TearsCamel Desing Patterns Learned Through Blood, Sweat, and Tears
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
Bilgin Ibryam
 
Dapr - A 10x Developer Framework for Any Language
Dapr - A 10x Developer Framework for Any LanguageDapr - A 10x Developer Framework for Any Language
Dapr - A 10x Developer Framework for Any Language
Bilgin Ibryam
 
Modernization patterns to refactor a legacy application into event driven mic...
Modernization patterns to refactor a legacy application into event driven mic...Modernization patterns to refactor a legacy application into event driven mic...
Modernization patterns to refactor a legacy application into event driven mic...
Bilgin Ibryam
 
Application modernization patterns with apache kafka, debezium, and kubernete...
Application modernization patterns with apache kafka, debezium, and kubernete...Application modernization patterns with apache kafka, debezium, and kubernete...
Application modernization patterns with apache kafka, debezium, and kubernete...
Bilgin Ibryam
 
Dual write strategies for microservices
Dual write strategies for microservicesDual write strategies for microservices
Dual write strategies for microservices
Bilgin Ibryam
 
How to financially survive while growing a small open source project
How to financially survive while growing a small open source projectHow to financially survive while growing a small open source project
How to financially survive while growing a small open source project
Bilgin Ibryam
 
Enterprise Integration for Ethereum
Enterprise Integration for EthereumEnterprise Integration for Ethereum
Enterprise Integration for Ethereum
Bilgin Ibryam
 
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
Camel Desing Patterns Learned Through Blood, Sweat, and TearsCamel Desing Patterns Learned Through Blood, Sweat, and Tears
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
Bilgin Ibryam
 
Ad

Recently uploaded (19)

Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)
APNIC
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)
APNIC
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 

The Kubernetes Effect

  • 2. Who am I? ➢ Bilgin Ibryam ➢ @bibryam ➢ http://ofbizian.com/ ➢ http://github.com/bibryam/ ➢ Integration Architect at Red Hat ➢ Committer for Camel, OFBiz, Isis at ASF ➢ Author of Camel Design Patterns, Kubernetes Patterns ➢ Interested in Integration, Cloud Native, Blockchain
  • 4. Cloud native... A common defnition: Cloud Native is structuring teams, culture and technology to utilize automation and architectures to manage complexity and unlock velocity. @jbeda A typical application: Applications adopting the principles of microservices packaged as containers orchestrated by platforms running on top of cloud infrastructure.
  • 5. A Kubernetes based microservice
  • 6. Local vs distributed primitives
  • 7. Distributed abstractions and primitives ● Application packaging (Container) ● Deployment unit (Pod) ● Auto scaling (HPA) ● Atomic work unit (Job) ● Recurring execution (CronJob) ● Service discovery (Service) ● Load balancing (Service) ● Application placement (Scheduler) ● Lifecycle management (Deployment) ● Health checks (liveness/readiness) ● Lifecycle hooks (PostStart/PreStop) ● Artifact grouping (Label) ● Custom Resource Defnition (CRD)
  • 8. Software design principles ● KISS - Keep it simple, stupid ● DRY - Don't repeat yourself ● YAGNI - You aren't gonna need it ● SoC - Separation of concerns ● SOLID Principles by Robert C. Martin: • Single responsibility • Open/Closed • Liskov substitution • Interface segregation • Dependency inversion Principles represent abstract guidelines or believes that help create systems with higher-quality attributes.
  • 9. The twelve-factor app i.e. the Heroku way 1. One codebase tracked in revision control, many deploys 2. Explicitly declare and isolate dependencies 3. Store confg in the environment 4. Treat backing services as attached resources 5. Strictly separate build and run stages 6. Execute the app as one or more stateless processes 7. Export services via port binding 8. Scale out via the process model 9. Maximize robustness with fast startup and graceful shutdown 10.Keep development, staging, and production as similar as possible 11. Treat logs as event streams 12.Run admin/management tasks as one-off processes
  • 10. Principles of container-based application design ● Build time: ● Single Concern Principle (SCP) ● Self-Containment Principle (S-CP) ● Image Immutability Principle (IIP) ● Runtime: ● High Observability Principle (HOP) ● Lifecycle Conformance Principle (LCP) ● Process Disposability Principle (PDP) ● Runtime Confnement Principle (RCP) https://www.redhat.com/en/resources/cloud-native-container-design-whitepaper
  • 11. Single concern principle Design patterns: • Sidecar • Ambassador • Adapter • Init-container • Defer-container
  • 13. Image immutability principle Also known as: • Dev/Prod parity • Snowflakes vs Phoenix • Impedance mismatch
  • 14. High observability principle Healthcheck implementations: • Spring Boot Actuator • Dropwizard Metrics • WildFly Swarm Monitor • MicroProfle Healthchecks • Apache Camel • And many others!
  • 15. Lifecycle conformance principle ● Graceful shutdown: ● SIGTERM ● SIGKILL ● Lifecycle hooks: ● PreStop ● PostStart
  • 16. Process disposability principle Also known as: ● Cattle rather than pets ● Don’t rely on a particular instance. ● Be aware of shots at your cattle. ● Be robust against sudden death. ● Stateless or with replicated state ● Idempotent startup ● Graceful shutdown
  • 17. Runtime confnement principle Implications: ● Pod scheduling ● Pod auto scaling ● Pod eviction ● Pod QoS classes: ● Best Effort ● Burstable ● Guaranteed ● Capacity management
  • 19. Software design patterns Object-oriented patterns Container orchestration patterns A reusable solution to a reoccurring problem within a given context.
  • 21. Sidecar pattern ● Use cases ● Monitoring, health checks, watchdog ● Logging ● Confguration ● Networking ● Offload proxy
  • 23. Specialized Sidecars Ambassador Pattern Proxy Pattern ● Use cases ● Reverse proxy to a heterogeneous system ● Log normalizer ● Metrics exporter ● Use cases ● Out-of-process proxy ● Resiliency ● Monitoring ● Security
  • 24. Init-container pattern ● Use cases ● Wait for external dependency ● Confguration ● Initialization
  • 26. More Kubernetes Patterns Confguration Patterns ● EnvVar Confguration ● Confguration Resource ● Confguration Template ● Immutable Confguration Advanced Patterns ● Stateful Service ● Custom Resource Descriptors ● Custom Controller ● Build Container
  • 27. Immutable confguration pattern ● Use cases ● Immutable confguration data ● Large confguration fles
  • 28. Confguration template pattern ● Use cases ● Complex templating logic
  • 29. Custom controller/Operator patterns Application Controller ● Prometheus operator ● Zookeeper operator ● Infnspan operator ● Strimzi - Kafka operator Extension controllers ● Expose controller (fabric8) ● Confgmap controller (fabric8) ● Linux Update Operator
  • 30. Techniques and practices • Aim for small images - this reduces container size, improves build, and deployment time. • Support arbitrary user IDs - avoid using the sudo command or requiring a specifc user ID. • Mark important ports - declare ports using the EXPOSE command. • Use volumes for persistent data - the data that needs to be preserved after a container is destroyed. • Set image metadata - Image metadata in the form of tags, labels, and annotations. • Synchronize host and image - attributes such as time and machine ID. • Log to STDOUT and STDERR - to ensure container logs are picked up and aggregated properly.
  • 32. Kubernetes resources ● The Kubernetes Effect (blog post) https://www.infoq.com/articles/kubernetes-effect ● Principles of container-based application design (white paper) https://www.redhat.com/en/resources/cloud-native-container-design-whitepaper ● Design patterns for container-based distributed systems (white paper) https://www.usenix.org/system/fles/conference/hotcloud16/hotcloud16_burns.pdf ● Designing Distributed Systems (free ebook) https://azure.microsoft.com/en-us/resources/designing-distributed-systems ● Kubernetes Patterns (ebook) https://leanpub.com/k8spatterns ● Kubernetes in Action (ebook) https://www.manning.com/books/kubernetes-in-action
  • 33. Q & A