SlideShare a Scribd company logo
Endoctus Academy
Next Trainings:
INTRODUCTION
TO KUBERNETES
April 27th
May 4th
May 18th
https://endoctus.com/course/introduction-to-kubernetes
Architecture Patterns for
Microservices in Kubernetes
Thomas Fricke
CTO
thomas@endocode.com
Penrose Tilings 1973
Golden Section
CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=474348
Giri Tiles, since 1200
Cronholm144, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=2303498
Roof Hafez Tomb
WHAT ARE CONTAINERS
Way of isolating and restricting Linux processes
● Isolation
○ namespaces
● Restriction
○ cgroups
○ capabilities
○ seccomp
CGROUPS: CONTROL GROUPS
● cpuset
● cpu
● cpuacct
● memory
● devices
● freezer
● net_cls
● ns
● blkio
these are directories with fine grained sub folders
NAMESPACES
Namespace Constant Isolates
Cgroup CLONE_NEWCGROUP Cgroup root directory
IPC CLONE_NEWIPC System V IPC, POSIX message queues
Network CLONE_NEWNET Network devices, stacks, ports, etc.
Mount CLONE_NEWNS Mount points
PID CLONE_NEWPID Process IDs
User CLONE_NEWUSER User and group IDs
UTS CLONE_NEWUTS Hostname and NIS domain name
CAPABILITIES
CAP_AUDIT_CONTROL, CAP_AUDIT_READ, CAP_AUDIT_WRITE, CAP_BLOCK_SUSPEND,
CAP_CHOWN,CAP_DAC_OVERRIDE, CAP_DAC_READ_SEARCH, CAP_FOWNER, CAP_FSETID,
CAP_IPC_LOCK, CAP_IPC_OWNER, CAP_KILL, CAP_LEASE, CAP_LINUX_IMMUTABLE,
CAP_MAC_ADMIN,CAP_MAC_OVERRIDE, CAP_MKNOD, CAP_NET_ADMIN,
CAP_NET_BIND_SERVICE, CAP_NET_BROADCAST, CAP_NET_RAW, CAP_SETGID,
CAP_SETFCAP, CAP_SETPCAP, CAP_SETUID, CAP_SYS_ADMIN, CAP_SYS_BOOT,
CAP_SYS_CHROOT, CAP_SYS_MODULE, CAP_SYS_NICE, CAP_SYS_PACCT, CAP_SYS_PTRACE,
CAP_SYS_RAWIO, CAP_SYS_RESOURCE, CAP_SYS_TIME, CAP_SYS_TTY_CONFIG,
CAP_SYSLOG, CAP_WAKE_ALARM, CAP_INIT_EFF_SET
These are a lot! Use profiles to group them together!
Linking Containers: Patterns
at least one common Namespace
process
network
…
process
network
…
mount
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubernetes
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubernetes
No need for a running process
network
…
pause
mount: WAR file
Multiple Containers
network
…
pause
mount: WAR file
pause
pause
mount: WAR file
Locomotive Pattern
By Nate Beal (originally posted to Flickr as Griffith, IN) [CC BY 2.0 (http://creativecommons.org/licenses/by/2.0)], via Wikimedia Commons
Scary ideas
network
…
pause
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubernetes
Share the Network namespace
files: credentials
user
mount
files
user
mount
network:
tun0
iptables
NET ADMIN
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubernetes
DEMO TIME
Linking Containers: Wormhole
common Namespace with the host
Docker Host
default namespaces
/usr/bin/docker
/var/run/docker.sock
apiVersion: v1
kind: Pod
metadata:
name: busybox-cloudbomb
spec:
containers:
- image: busybox
command:
- /bin/sh
- "-c"
- "while true; 
do 
docker run -d --name BOOM_$(cat /dev/urandom | tr -cd 'a-f0-9' | head -c 6) nginx ; 
done"
name: cloudbomb
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-socket
- mountPath: /bin/docker
name: docker-binary
volumes:
- name: docker-socket
hostPath:
path: /var/run/docker.sock
- name: docker-binary
hostPath:
path: /bin/docker
DEMO TIME
ORCHESTRATION
Greek for “Helmsman”; also the root of the
words “governor” and “cybernetic”
● Runs and manages containers
● Inspired and informed by Google’s
experiences and internal systems
● Supports multiple cloud and bare-metal
environments
● Supports multiple container runtimes
● 100% Open source, written in Go
Manage applications, not machines
KUBERNETES
Deployment
Replicaset
v1.7.9 v1.7.9 v1.7.9
Replicaset
v1.10.2 v1.10.2 v1.10.2
Distributed Patterns
● Client - Server
● Layers
● Message Queues
● Cattle - Pets
● Replication
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubernetes
Rob Hirschfeld https://www.openstack.org/summit/boston-2017/vote-for-speakers/#/18163
SUMMARY
● Lot of useful standard patterns
○ sidecar
○ scatter gather
○ locomotive, tractor
● Powerful Linux container patterns
○ separation of control and transport
○ wormhole
○ here be dragons
● Orchestration Patterns
○ Helm charts
○ upcoming: Service Broker
CONCLUSION
● Concepts before Coding
● Reshaping applications
○ Legacy
○ Compromises are necessary
○ Containment for Technical Debt
● Paradigm Shift
● Microservice Mindset
QUESTIONS?
https://endocode.com
https://endocode.com/blog/
https://endocode.com/trainings-overview/
Visit us on GitHub https://github.com/endocode

More Related Content

What's hot (20)

PDF
Docker 1.11 @ Docker SF Meetup
Docker, Inc.
 
PPTX
Intro- Docker Native for OSX and Windows
Thomas Chacko
 
PDF
Container orchestration
Timo Derstappen
 
PPTX
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
PDF
Kubernetes Basic Operation
Simon Su
 
PDF
Kubernetes in 30 minutes (2017/03/10)
lestrrat
 
PDF
KubeCon EU 2016: A Practical Guide to Container Scheduling
KubeAcademy
 
PPTX
Deploy at scale with CoreOS Kubernetes and Apache Stratos
Chris Haddad
 
PDF
Ansible docker
QNIB Solutions
 
PDF
Project Atomic-Nulecule
Lalatendu Mohanty
 
PDF
Using linuxKit to build custom rancherOS systems
Moby Project
 
PDF
Docker and Kubernetes 101 workshop
Sathish VJ
 
PDF
runC: The little engine that could (run Docker containers) by Docker Captain ...
Docker, Inc.
 
PPTX
Kubernetes
Venkata Naga Ravi
 
PDF
Demystifying kubernetes
Works Applications
 
PDF
Kubernetes Walk Through from Technical View
Lei (Harry) Zhang
 
PDF
Virtualization inside kubernetes
inwin stack
 
PDF
kubernetes for beginners
Dominique Dumont
 
PDF
Containerd Internals: Building a Core Container Runtime
Phil Estes
 
PDF
Docker internals
Rohit Jnagal
 
Docker 1.11 @ Docker SF Meetup
Docker, Inc.
 
Intro- Docker Native for OSX and Windows
Thomas Chacko
 
Container orchestration
Timo Derstappen
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
Kubernetes Basic Operation
Simon Su
 
Kubernetes in 30 minutes (2017/03/10)
lestrrat
 
KubeCon EU 2016: A Practical Guide to Container Scheduling
KubeAcademy
 
Deploy at scale with CoreOS Kubernetes and Apache Stratos
Chris Haddad
 
Ansible docker
QNIB Solutions
 
Project Atomic-Nulecule
Lalatendu Mohanty
 
Using linuxKit to build custom rancherOS systems
Moby Project
 
Docker and Kubernetes 101 workshop
Sathish VJ
 
runC: The little engine that could (run Docker containers) by Docker Captain ...
Docker, Inc.
 
Kubernetes
Venkata Naga Ravi
 
Demystifying kubernetes
Works Applications
 
Kubernetes Walk Through from Technical View
Lei (Harry) Zhang
 
Virtualization inside kubernetes
inwin stack
 
kubernetes for beginners
Dominique Dumont
 
Containerd Internals: Building a Core Container Runtime
Phil Estes
 
Docker internals
Rohit Jnagal
 

Viewers also liked (20)

PDF
Continuous delivery of microservices with kubernetes - Quintor 27-2-2017
Arjen Wassink
 
PPTX
K8S in prod
Mageshwaran Rajendran
 
PPTX
Docker and kubernetes
Dongwon Kim
 
PPTX
More tips and tricks for running containers like a pro - Rancher Online MEetu...
Shannon Williams
 
PPTX
Introduction to container mangement
Martin Marcher
 
PPTX
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
Apigee | Google Cloud
 
PDF
Extend and build on Kubernetes
Stefan Schimanski
 
PDF
Understanding Kubernetes
Tu Pham
 
PDF
Kubernetes on aws
Yousun Jeong
 
PDF
Idea to Production - with Gitlab and Kubernetes
Simon Dittlmann
 
PPTX
Stateful set in kubernetes implementation & usecases
Krishna-Kumar
 
PDF
Smuggling Multi-Cloud Support into Cloud-native Applications using Elastic Co...
Nane Kratzke
 
PDF
Kubernetes on AWS at Europe's Leading Online Fashion Platform
Henning Jacobs
 
PPTX
Security best practices for kubernetes deployment
Michael Cherny
 
PPTX
Adopting Kubernetes with Puppet
Puppet
 
PDF
Kubernetes API - deep dive into the kube-apiserver
Stefan Schimanski
 
PPTX
Kubernetes CI/CD with Helm
Adnan Abdulhussein
 
PDF
How to Monitor Microservices
Sysdig
 
PPTX
Kubernetes as Orchestrator for A10 Lightning Controller
Akshay Mathur
 
PDF
Microservices at scale with docker and kubernetes - AMS JUG 2017
Arjen Wassink
 
Continuous delivery of microservices with kubernetes - Quintor 27-2-2017
Arjen Wassink
 
Docker and kubernetes
Dongwon Kim
 
More tips and tricks for running containers like a pro - Rancher Online MEetu...
Shannon Williams
 
Introduction to container mangement
Martin Marcher
 
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
Apigee | Google Cloud
 
Extend and build on Kubernetes
Stefan Schimanski
 
Understanding Kubernetes
Tu Pham
 
Kubernetes on aws
Yousun Jeong
 
Idea to Production - with Gitlab and Kubernetes
Simon Dittlmann
 
Stateful set in kubernetes implementation & usecases
Krishna-Kumar
 
Smuggling Multi-Cloud Support into Cloud-native Applications using Elastic Co...
Nane Kratzke
 
Kubernetes on AWS at Europe's Leading Online Fashion Platform
Henning Jacobs
 
Security best practices for kubernetes deployment
Michael Cherny
 
Adopting Kubernetes with Puppet
Puppet
 
Kubernetes API - deep dive into the kube-apiserver
Stefan Schimanski
 
Kubernetes CI/CD with Helm
Adnan Abdulhussein
 
How to Monitor Microservices
Sysdig
 
Kubernetes as Orchestrator for A10 Lightning Controller
Akshay Mathur
 
Microservices at scale with docker and kubernetes - AMS JUG 2017
Arjen Wassink
 
Ad

Similar to Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubernetes (20)

PDF
Introduction to Docker (as presented at December 2013 Global Hackathon)
Jérôme Petazzoni
 
PDF
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
Yandex
 
PDF
Docker Introduction + what is new in 0.9
Jérôme Petazzoni
 
PDF
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
Jérôme Petazzoni
 
PDF
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
dotCloud
 
PDF
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Docker, Inc.
 
PPTX
Introduction to containers
Nitish Jadia
 
PDF
Docker and Containers for Development and Deployment — SCALE12X
Jérôme Petazzoni
 
PPTX
A brief study on Kubernetes and its components
Ramit Surana
 
PDF
Docker and-containers-for-development-and-deployment-scale12x
rkr10
 
PDF
From Monolith to Docker Distributed Applications
Carlos Sanchez
 
PPTX
Kubernetes the deltatre way the basics - introduction to containers and orc...
Rauno De Pasquale
 
PDF
Understand how docker works
Li Jingtian
 
PDF
Understand how docker works
Justin Li
 
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
PDF
Kubernetes
Linjith Kunnon
 
PDF
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud
 
PPTX
Docker Container Security
Suraj Khetani
 
PPTX
Docker-N-Beyond
santosh007
 
PPTX
Introduction to Kubernetes
Vishal Biyani
 
Introduction to Docker (as presented at December 2013 Global Hackathon)
Jérôme Petazzoni
 
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
Yandex
 
Docker Introduction + what is new in 0.9
Jérôme Petazzoni
 
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
Jérôme Petazzoni
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
dotCloud
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Docker, Inc.
 
Introduction to containers
Nitish Jadia
 
Docker and Containers for Development and Deployment — SCALE12X
Jérôme Petazzoni
 
A brief study on Kubernetes and its components
Ramit Surana
 
Docker and-containers-for-development-and-deployment-scale12x
rkr10
 
From Monolith to Docker Distributed Applications
Carlos Sanchez
 
Kubernetes the deltatre way the basics - introduction to containers and orc...
Rauno De Pasquale
 
Understand how docker works
Li Jingtian
 
Understand how docker works
Justin Li
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Kubernetes
Linjith Kunnon
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud
 
Docker Container Security
Suraj Khetani
 
Docker-N-Beyond
santosh007
 
Introduction to Kubernetes
Vishal Biyani
 
Ad

Recently uploaded (20)

PPT
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
PPTX
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PPTX
Engineering the Java Web Application (MVC)
abhishekoza1981
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Engineering the Java Web Application (MVC)
abhishekoza1981
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 

Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubernetes