SlideShare a Scribd company logo
Designing Cloud Native Applications
with Kubernetes
June 2017
@bibryam
2 @bibryam
Bilgin Ibryam
● Architect at Red Hat
● ASF Member
● Committer for Isis,Camel,OFBiz
● Microservices & Cloud Native
● Twitter: @bibryam
● Email: bibryam@gmail.com
● Blog: http://ofbizian.com
● Github: https://github.com/bibryam
3 @bibryam
Agenda
● Cloud Native Ecosystems
● Kubernetes Abstractions & Primitives
● Container Design Principles
● Kubernetes Design Patterns
● Benefits of using Kubernetes
4 @bibryam
Microservices Architecture
...trades code complexity for operational complexity
5 @bibryam
Cloud Native Reach
6 @bibryam
A Good Definition
Cloud Native is structuring teams, culture and technology
to utilize automation and architectures to manage
complexity and unlock velocity.
Joe Beda, Heptio
7 @bibryam
Common Characteristics
Applications adopting the principles of
Microservices packaged as
Containers orchestrated by
Platforms running on top of
Cloud infrastructure,
developed using practices such as
Continuous Delivery and DevOps.
8 @bibryam
Brief Cloud (Native) History
9 @bibryam
Cloud Native Landscape
10 @bibryam
Cloud Native Ecosystems
11 @bibryam
Ecosystem Concerns
● Governance model
● Supporting organizations
● User community
● Culture, ways of working
● Technology (maturity * potential)
● Complementary tools
● Documentation, conferences, books
● Coolness factor and developer happiness
12 @bibryam
CNCF Members
13 @bibryam
CNCF Projects
14 @bibryam
Potential Future Projects
● Tracing: OpenTracing
● Messaging: NATS
● Stream Processing: Heron
● Networking: Flannel, Calico, Weave
● Configuration: etcd
● Database: CockroachDB
● Storage: Minio
15 @bibryam
Agenda
● Cloud Native Ecosystems
● Kubernetes Abstractions & Primitives
● Container Design Principles
● Kubernetes Design Patterns
● Benefits of using Kubernetes
16 @bibryam
A Kubernetes Microservice
17 @bibryam
Common Capabilities
18 @bibryam
Common Abstractions & Primitives
● Application packaging (Container)
● Deployment unit (Pod)
● Recurring execution (CronJob)
● Service discovery & load balancing (Service)
● Application placement (Scheduler)
● Artifact grouping (Label)
● Resources isolation (Container/Namespace)
19 @bibryam
OOP Abstractions & Primitives
20 @bibryam
Java Abstractions & Primitives
21 @bibryam
K8S Abstractions & Primitives
22 @bibryam
Local & Distributed Primitives
23 @bibryam
Agenda
● Cloud Native Ecosystems
● Kubernetes Abstractions & Primitives
● Container Design Principles
● Kubernetes Design Patterns
● Benefits of using Kubernetes
24 @bibryam
(SOLID) Principles of Container Design
● Single Concern Principle (SCP)
● Self-Containment Principle (S-CP)
● Image Immutability Principle (IIP)
● High Observability Principle (HOP)
● Lifecycle Conformance Principle (LCP)
● Process Disposability Principle (PDP)
● Runtime Confinement Principle (RCP)
25 @bibryam
Single Concern Principle
Patterns
● Sidecar
● Ambassador
● Adapter
● Init-container
● Defer-container
26 @bibryam
Self-Containment Principle
AntiPattern
● Locomotive
27 @bibryam
Image Immutability Principle
● Dev/prod parity
28 @bibryam
High Observability Principle
● Spring Boot Actuator
● Dropwizard Metrics
● WildFly Swarm Monitor
● MicroProfile Healthchecks
29 @bibryam
Lifecycle Conformance Principle
● SIGTERM
● SIGKILL
● PreStop
● PostStart
30 @bibryam
Process Disposability Principle
● Fast startup
● Graceful shutdown
● Don’t rely on a particular instance
● Be aware of shots at your cattle
● Be robust against sudden death
31 @bibryam
Runtime Confinement Principle
● resources.limits.cpu
● resources.limits.memory
● resources.requests.cpu
● resources.requests.memory
32 @bibryam
More Container Best Practices
● Small images
● Arbitrary user IDs
● Port declarations
● Volume declarations
● Image metadata
● Host and image sync
https://www.slideshare.net/luebken/container-patterns
https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices
http://docs.projectatomic.io/container-best-practices
https://docs.openshift.com/enterprise/3.0/creating_images/guidelines.html
http://blog.arungupta.me/docker-container-anti-patterns/
https://12factor.net/
33 @bibryam
Agenda
● Cloud Native Ecosystems
● Kubernetes Abstractions & Primitives
● Container Design Principles
● Kubernetes Design Patterns
● Benefits of using Kubernetes
34 @bibryam
Container Oriented Design Patterns
https://www.usenix.org/system/files/conference/hotcloud16/hotcloud16_burns.pdf
35 @bibryam
More Kubernetes Patterns
Configuration Management –> ConfigMaps
Singleton Services -> replicas: 1
Initializers -> Init Container
Daemon Services –> Daemon Sets
Stateful Services –> StatefulSet
https://leanpub.com/k8spatterns/
36 @bibryam
Agenda
● Cloud Native Ecosystems
● Kubernetes Abstractions & Primitives
● Container Design Principles
● Kubernetes Design Patterns
● Benefits of using Kubernetes
37 @bibryam
Benefits of using Kubernetes
1) Self Service Environments
2)Dynamically Placed Applications
3)Declarative Service Deployments
4)Blue-Green and Canary Releases
5)Application Resilience & Antifragility
6)Service Discovery & Load Balancing
7)Service Clustering
8)(Scheduled) Batch Jobs
9)Immutable Infrastructure
38 @bibryam
Self Service Environments
An Environment is not a VM any longer
39 @bibryam
Dynamically Placed Applications
Forget about these manual placement strategies and...
40 @bibryam
Dynamically Placed Applications
… and trust the Scheduler
41 @bibryam
Declarative Service Deployments
Deployment config based options
42 @bibryam
Blue-Green and Canary Releases
Routing config based options
43 @bibryam
Application Resilience
For true resilience you must go outside of the JVM!
44 @bibryam
Application Resilience & Antifragility
● Infinite loops: CPU shares and quotas
● Memory leaks: OOM yourself
● Disk hogs: Quotas
● Fork bombs: Process limits
● Circuit Breaker, Timeout, Retry as SideCar
● Failover and Service Discovery as SideCar
● Process Bulkheading with Containers
● Hardware Bulkheading through Scheduler
● Auto-scaling & Self-healing
45 @bibryam
Service Discovery & Load Balancing
Client side – on the JVM
46 @bibryam
Service Discovery & Load Balancing
Provided by the platform
47 @bibryam
(Scheduled) Batch Jobs
Provided by the platform
Example batch jobs in Java
● JDK Timer
● ScheduledExecutorService
● Quartz Scheduler
● Spring Batch
48 @bibryam
Immutable Infrastructure
Application binaries → Container
Deployment unit → Pod
Resource demands → request/limit/PVC
Configurations → ConfigMap/Secret
Update/rollback mechanism → Deployment
49 @bibryam
Key Takeaways
1. Automate routine tasks through a cloud native platform.
(placement, updates, healthchecks, self-healing, scaling)
2. Move XFR/NFR from application to platform layer.
(service discovery, circuit breaker, jobs, configurations, logs)
3. Ecosystem matters
(Bet on a complete ecosystem, not a single platform)
50 @bibryam
Cloud Native is not Mandatory
It is not necessary to change. Survival is not mandatory.
W. Edwards Deming
Q & A
@bibryam
Kubernetes Patterns http://leanpub.com/k8spatterns
More on this topic: https://twitter.com/bibryam

More Related Content

PPTX
VMware Tanzu Kubernetes Connect
PDF
Deploying your first application with Kubernetes
PDF
Kubernetes 101
PDF
Open shift 4 infra deep dive
PDF
Why Microservice
PPTX
MSA ( Microservices Architecture ) 발표 자료 다운로드
PPTX
Introduction to microservices
PDF
A Pattern Language for Microservices
VMware Tanzu Kubernetes Connect
Deploying your first application with Kubernetes
Kubernetes 101
Open shift 4 infra deep dive
Why Microservice
MSA ( Microservices Architecture ) 발표 자료 다운로드
Introduction to microservices
A Pattern Language for Microservices

What's hot (20)

PDF
Practical Microservice Architecture (edition 2022).pdf
PDF
Scaling DevSecOps Culture for Enterprise
PDF
Machine Learning using Kubeflow and Kubernetes
PDF
Helm - Application deployment management for Kubernetes
PDF
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
PPTX
Kubernetes introduction
PDF
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
PDF
OpenShift 4, the smarter Kubernetes platform
PDF
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
PDF
Secrets in Kubernetes
PDF
OpenShift Virtualization- Technical Overview.pdf
PDF
Cloud Native Application
PPTX
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
PPTX
DevSecOps in the Cloud from the Lens of a Well-Architected Framework.pptx
PDF
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
PDF
Introduction to kubernetes
PDF
Introduction of Kubernetes - Trang Nguyen
PPSX
On-premise to Microsoft Azure Cloud Migration.
PDF
Rancher 2.0 Technical Deep Dive
PPTX
Platform engineering 101
Practical Microservice Architecture (edition 2022).pdf
Scaling DevSecOps Culture for Enterprise
Machine Learning using Kubeflow and Kubernetes
Helm - Application deployment management for Kubernetes
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
Kubernetes introduction
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
OpenShift 4, the smarter Kubernetes platform
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Secrets in Kubernetes
OpenShift Virtualization- Technical Overview.pdf
Cloud Native Application
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevSecOps in the Cloud from the Lens of a Well-Architected Framework.pptx
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Introduction to kubernetes
Introduction of Kubernetes - Trang Nguyen
On-premise to Microsoft Azure Cloud Migration.
Rancher 2.0 Technical Deep Dive
Platform engineering 101
Ad

Similar to Designing Cloud Native Applications with Kubernetes (20)

PDF
What next after microservices
PDF
The Evolution of Distributed Systems on Kubernetes
PDF
Cloud Native Camel Design Patterns
PDF
The Kubernetes Effect
PDF
Kubernetes: The evolution of distributed systems | DevNation Tech Talk
PDF
Kubernetes on the Edge / 在邊緣的K8S
PPTX
Design Patterns for Pods and Containers in Kubernetes - Webinar by zekeLabs
PDF
Containers and Kubernetes without limits
PPTX
Hybrid cloud openstack meetup
PDF
Integration in the Cloud, by Rob Davies
PDF
One Kubernetes to rule them all (ZEUS 2019 Keynote)
PDF
Securing Kubernetes Workloads
PDF
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
PPTX
Docker Containers for Continuous Delivery
PDF
Running and Managing Kubernetes on OpenStack
PDF
Cloud Native DevOps
PDF
Использование AzureDevOps при разработке микросервисных приложений
PPTX
Istio - A Service Mesh for Microservices as Scale
PPTX
Managing Database Containers with Kubernetes Operators and Docker
PPTX
Container and Test Automation Management Practices in TrendMicro
What next after microservices
The Evolution of Distributed Systems on Kubernetes
Cloud Native Camel Design Patterns
The Kubernetes Effect
Kubernetes: The evolution of distributed systems | DevNation Tech Talk
Kubernetes on the Edge / 在邊緣的K8S
Design Patterns for Pods and Containers in Kubernetes - Webinar by zekeLabs
Containers and Kubernetes without limits
Hybrid cloud openstack meetup
Integration in the Cloud, by Rob Davies
One Kubernetes to rule them all (ZEUS 2019 Keynote)
Securing Kubernetes Workloads
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
Docker Containers for Continuous Delivery
Running and Managing Kubernetes on OpenStack
Cloud Native DevOps
Использование AzureDevOps при разработке микросервисных приложений
Istio - A Service Mesh for Microservices as Scale
Managing Database Containers with Kubernetes Operators and Docker
Container and Test Automation Management Practices in TrendMicro
Ad

More from Bilgin Ibryam (9)

PDF
Dapr - A 10x Developer Framework for Any Language
PDF
Modernization patterns to refactor a legacy application into event driven mic...
PDF
Application modernization patterns with apache kafka, debezium, and kubernete...
PDF
Dual write strategies for microservices
PDF
How to financially survive while growing a small open source project
PDF
Enterprise Integration for Ethereum
PDF
Cloud Native Patterns
ODP
Cloud Native Java Development Patterns
PDF
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
Dapr - A 10x Developer Framework for Any Language
Modernization patterns to refactor a legacy application into event driven mic...
Application modernization patterns with apache kafka, debezium, and kubernete...
Dual write strategies for microservices
How to financially survive while growing a small open source project
Enterprise Integration for Ethereum
Cloud Native Patterns
Cloud Native Java Development Patterns
Camel Desing Patterns Learned Through Blood, Sweat, and Tears

Recently uploaded (20)

PPTX
L1 - Introduction to python Backend.pptx
PPTX
ISO 45001 Occupational Health and Safety Management System
PPTX
CHAPTER 2 - PM Management and IT Context
PPT
Introduction Database Management System for Course Database
PPTX
ai tools demonstartion for schools and inter college
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
medical staffing services at VALiNTRY
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
history of c programming in notes for students .pptx
PPTX
Transform Your Business with a Software ERP System
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
L1 - Introduction to python Backend.pptx
ISO 45001 Occupational Health and Safety Management System
CHAPTER 2 - PM Management and IT Context
Introduction Database Management System for Course Database
ai tools demonstartion for schools and inter college
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Which alternative to Crystal Reports is best for small or large businesses.pdf
medical staffing services at VALiNTRY
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Operating system designcfffgfgggggggvggggggggg
history of c programming in notes for students .pptx
Transform Your Business with a Software ERP System
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Design an Analysis of Algorithms II-SECS-1021-03
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Odoo Companies in India – Driving Business Transformation.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...

Designing Cloud Native Applications with Kubernetes