SlideShare a Scribd company logo
1 of 4
Download to read offline
Microservices - Docker & Kubernetes
Study Guide
MICROSERVICES - DOCKER & KUBERNETES
__________________________________________________________________________________
Page 1
Microservices - Dockers and Kubernetes
Table of Contents
Preface ................................................................................................................................................3
1 Monolithic and Microservices...............................................................................................................4
1.1 Introduction to Microservices.................................................................................................5
1.2 Monolithic vs. Microservices vs. SOA .....................................................................................7
1.3 Moving from Monolithic to Microservices .............................................................................9
1.4 Microservices Architecture and Best Practices.....................................................................10
1.5 Microservices Design Patterns and Strategies......................................................................13
Lab Exercise 1....................................................................................................................................17
Lab Exercise 2....................................................................................................................................22
Lab Exercise 3....................................................................................................................................29
2 Starting with Linux Containers............................................................................................................32
2.1 Introduction to Linux Containers..........................................................................................33
2.2 Containers vs. Virtual Machines ...........................................................................................36
2.3 Docker Basics - Components and Architecture.....................................................................37
2.4 Docker Installation and Configuration..................................................................................41
2.5 Application considerations ...................................................................................................41
Lab Exercise 1....................................................................................................................................45
Lab Exercise 2....................................................................................................................................47
Lab Exercise 3....................................................................................................................................49
3 Working with Docker - Part 1..............................................................................................................50
3.1 Running Docker Images ........................................................................................................51
3.2 Transaction Management in Microservices..........................................................................52
3.3 Managing Containerized Applications ..................................................................................53
3.4 Container Lifecycle................................................................................................................55
4 Working with Docker - Part 2..............................................................................................................57
4.1 Accessing Images from Docker Hub......................................................................................58
4.2 Building Images using Dockerfile ..........................................................................................59
4.3 Docker Networking ...............................................................................................................68
4.4 Docker Volumes....................................................................................................................74
4.5 Container migration and packaging......................................................................................79
4.6 Challenges in Deploying Docker Containers .........................................................................80
Lab Exercise 1....................................................................................................................................83
MICROSERVICES - DOCKER & KUBERNETES
__________________________________________________________________________________
Page 2
Lab Exercise 2....................................................................................................................................84
Lab Exercise 3....................................................................................................................................84
Lab Exercise 4....................................................................................................................................86
Lab Exercise 5....................................................................................................................................87
Lab Exercise 6....................................................................................................................................88
5 Working with Docker - Part 3..............................................................................................................91
5.1 Using Docker Compose.........................................................................................................92
5.2 Monitoring Docker................................................................................................................93
5.3 Docker Security.....................................................................................................................95
5.4 Docker Registry .....................................................................................................................98
Lab Exercise (Optional) .....................................................................................................................99
6 Working with Docker - Part 4............................................................................................................101
6.1 Using Security tools for Docker...........................................................................................102
6.2 Docker's Built-in Security Features.....................................................................................102
6.3 Docker security best practices............................................................................................102
7 Starting with Kubernetes ..................................................................................................................104
7.1 Key Concepts in Kubernetes ...............................................................................................105
7.2 Kubernetes Cluster Architecture.........................................................................................105
7.3 Networking models (CNI vs CNM).......................................................................................107
7.4 Kubernetes Cluster Planning...............................................................................................110
7.5 Installing and Configuring Master Controller......................................................................112
7.6 Installing and Configuring Nodes/Minions .........................................................................115
7.7 Kubernetes Commands.......................................................................................................118
Lab Exercise.....................................................................................................................................119
8 Advanced Kubernetes.......................................................................................................................122
8.1 Kubernetes Cluster Management.......................................................................................123
8.2 Create and Deploy Pod Definitions.....................................................................................123
8.3 Configure Pods and Containers...........................................................................................124
8.4 Volume management with PODs........................................................................................126
8.5 Networking In Kubernetes..................................................................................................127
8.6 Commands in Kubernetes...................................................................................................130
8.7 Run Applications on Kubernetes Cluster ............................................................................132
8.8 Kubernetes vs. Docker Swarm ............................................................................................137
MICROSERVICES - DOCKER & KUBERNETES
__________________________________________________________________________________
Page 3
PREFACE
Microservices have been a growing trend in the last few years and organizations have felt the need
to adopt them to keep up with the changing IT landscape. The Docker project started in 2013 is a
Linux based service and forms a foundation for running Microservices. Later, the Kubernetes project
was developed by Google for deploying, automating, scaling and managing containerized
applications in a cluster.
This is a customized study guide to get started with Microservices - Docker and Kubernetes.
About two decades ago, IT and computing industry had a limited set of matured technologies.
Further back in time, there were still lesser technologies available to explore for our projects.
At present, there are numerous technologies, standards, computing languages and platforms,
among others available to choose from. Present day projects require the right planning and
execution to last long.
There are numerous open source applications available in the opensource doman. Github.com and
Hub.docker.com are very popular among the developer community, and you can branch out one or
more of project available there to get started with your project, without reinventing the wheel.
This guide attempts to bridge the gap in the least possible time, and covers the essentials features to
get started with Microservices, Docker, and Kubernetes. After reading through the text, and by
practicilng the examples, you will get familiarised with developing and deploying Microservices on
Docker and Kubernetes platforms.
Author
Manish Chopra
(December 2017)

More Related Content

What's hot

Tr 3749 -net_app_storage_best_practices_for_v_mware_vsphere,_dec_11
Tr 3749 -net_app_storage_best_practices_for_v_mware_vsphere,_dec_11Tr 3749 -net_app_storage_best_practices_for_v_mware_vsphere,_dec_11
Tr 3749 -net_app_storage_best_practices_for_v_mware_vsphere,_dec_11Accenture
 
Sybase Adaptive Server Anywhere for Linux
Sybase Adaptive Server Anywhere for LinuxSybase Adaptive Server Anywhere for Linux
Sybase Adaptive Server Anywhere for Linuxmarcorinco
 
Maven definitive guide
Maven definitive guideMaven definitive guide
Maven definitive guidevirusworm
 
Step by Step Windows Azure pack for windows server 2012 R2 Guide v1
Step by Step Windows Azure pack for windows server 2012 R2 Guide v1Step by Step Windows Azure pack for windows server 2012 R2 Guide v1
Step by Step Windows Azure pack for windows server 2012 R2 Guide v1Kesavan Munuswamy
 
TsDisaster recovery using Veritas Storage Foundation Enterprise HA with IBM S...
TsDisaster recovery using Veritas Storage Foundation Enterprise HA with IBM S...TsDisaster recovery using Veritas Storage Foundation Enterprise HA with IBM S...
TsDisaster recovery using Veritas Storage Foundation Enterprise HA with IBM S...IBM India Smarter Computing
 
Java how to_program__7th_edition
Java how to_program__7th_editionJava how to_program__7th_edition
Java how to_program__7th_editionABDUmomo
 
Firewall and proxy servers howto
Firewall and proxy servers howtoFirewall and proxy servers howto
Firewall and proxy servers howtoKumar
 
iPlanet to HP Apache Migration Plan
iPlanet to HP Apache Migration PlaniPlanet to HP Apache Migration Plan
iPlanet to HP Apache Migration Planwebhostingguy
 
Endversion1 skriptum characterization of miscellaneous multi parametrical sil...
Endversion1 skriptum characterization of miscellaneous multi parametrical sil...Endversion1 skriptum characterization of miscellaneous multi parametrical sil...
Endversion1 skriptum characterization of miscellaneous multi parametrical sil...EjderCevher
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enAnh Vuong
 
Javier Rodriguez Olalla - Streaming over Mobile IPv6 networks
Javier Rodriguez Olalla - Streaming over Mobile IPv6 networksJavier Rodriguez Olalla - Streaming over Mobile IPv6 networks
Javier Rodriguez Olalla - Streaming over Mobile IPv6 networksJavier Rodríguez Olalla
 
Installing sql server 2012 failover cluster instance
Installing sql server 2012 failover cluster instanceInstalling sql server 2012 failover cluster instance
Installing sql server 2012 failover cluster instanceDavid Muise
 
Spring Reference
Spring ReferenceSpring Reference
Spring ReferenceSyed Shahul
 
Guía de administración de Asterisk
Guía de administración de AsteriskGuía de administración de Asterisk
Guía de administración de AsteriskCef Espinoza
 
Diesel to Solar
Diesel to SolarDiesel to Solar
Diesel to SolarEAI
 

What's hot (19)

Tr 3749 -net_app_storage_best_practices_for_v_mware_vsphere,_dec_11
Tr 3749 -net_app_storage_best_practices_for_v_mware_vsphere,_dec_11Tr 3749 -net_app_storage_best_practices_for_v_mware_vsphere,_dec_11
Tr 3749 -net_app_storage_best_practices_for_v_mware_vsphere,_dec_11
 
Sybase Adaptive Server Anywhere for Linux
Sybase Adaptive Server Anywhere for LinuxSybase Adaptive Server Anywhere for Linux
Sybase Adaptive Server Anywhere for Linux
 
Odoo development
Odoo developmentOdoo development
Odoo development
 
Maven definitive guide
Maven definitive guideMaven definitive guide
Maven definitive guide
 
Step by Step Windows Azure pack for windows server 2012 R2 Guide v1
Step by Step Windows Azure pack for windows server 2012 R2 Guide v1Step by Step Windows Azure pack for windows server 2012 R2 Guide v1
Step by Step Windows Azure pack for windows server 2012 R2 Guide v1
 
Apis php-en sql .
Apis php-en sql .Apis php-en sql .
Apis php-en sql .
 
TsDisaster recovery using Veritas Storage Foundation Enterprise HA with IBM S...
TsDisaster recovery using Veritas Storage Foundation Enterprise HA with IBM S...TsDisaster recovery using Veritas Storage Foundation Enterprise HA with IBM S...
TsDisaster recovery using Veritas Storage Foundation Enterprise HA with IBM S...
 
Java how to_program__7th_edition
Java how to_program__7th_editionJava how to_program__7th_edition
Java how to_program__7th_edition
 
Firewall and proxy servers howto
Firewall and proxy servers howtoFirewall and proxy servers howto
Firewall and proxy servers howto
 
iPlanet to HP Apache Migration Plan
iPlanet to HP Apache Migration PlaniPlanet to HP Apache Migration Plan
iPlanet to HP Apache Migration Plan
 
Endversion1 skriptum characterization of miscellaneous multi parametrical sil...
Endversion1 skriptum characterization of miscellaneous multi parametrical sil...Endversion1 skriptum characterization of miscellaneous multi parametrical sil...
Endversion1 skriptum characterization of miscellaneous multi parametrical sil...
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-en
 
Book hudson
Book hudsonBook hudson
Book hudson
 
Javier Rodriguez Olalla - Streaming over Mobile IPv6 networks
Javier Rodriguez Olalla - Streaming over Mobile IPv6 networksJavier Rodriguez Olalla - Streaming over Mobile IPv6 networks
Javier Rodriguez Olalla - Streaming over Mobile IPv6 networks
 
Installing sql server 2012 failover cluster instance
Installing sql server 2012 failover cluster instanceInstalling sql server 2012 failover cluster instance
Installing sql server 2012 failover cluster instance
 
Spring Reference
Spring ReferenceSpring Reference
Spring Reference
 
Guía de administración de Asterisk
Guía de administración de AsteriskGuía de administración de Asterisk
Guía de administración de Asterisk
 
Selenium python
Selenium pythonSelenium python
Selenium python
 
Diesel to Solar
Diesel to SolarDiesel to Solar
Diesel to Solar
 

Similar to Microservices with Dockers and Kubernetes

Docker containerization cookbook
Docker containerization cookbookDocker containerization cookbook
Docker containerization cookbookPascal Louis
 
ScalaCheck Cookbook v1.0
ScalaCheck Cookbook v1.0ScalaCheck Cookbook v1.0
ScalaCheck Cookbook v1.0Oscar Renalias
 
Ref arch for ve sg248155
Ref arch for ve sg248155Ref arch for ve sg248155
Ref arch for ve sg248155Accenture
 
Livre blanc technique sur l’architecture de référence
Livre blanc technique sur l’architecture de référenceLivre blanc technique sur l’architecture de référence
Livre blanc technique sur l’architecture de référenceMicrosoft France
 
Guia do usuario para interface web do at 8000 s
Guia do usuario para interface web do at 8000 sGuia do usuario para interface web do at 8000 s
Guia do usuario para interface web do at 8000 sNetPlus
 
Load runner generator
Load runner generatorLoad runner generator
Load runner generatormohan987654
 
spring-security-reference.pdf
spring-security-reference.pdfspring-security-reference.pdf
spring-security-reference.pdfhorica9300
 
Coherence developer's guide
Coherence developer's guideCoherence developer's guide
Coherence developer's guidewangdun119
 
Qtp In Depth
Qtp In DepthQtp In Depth
Qtp In DepthAlok
 
Load runner controller
Load runner controllerLoad runner controller
Load runner controllerAshwin Mane
 
Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Sal Marcus
 
Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Sal Marcus
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enRifky Rachman
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enRifky Rachman
 
Tellurium 0.6.0 User Guide
Tellurium 0.6.0 User GuideTellurium 0.6.0 User Guide
Tellurium 0.6.0 User GuideJohn.Jian.Fang
 
Java : How to Program - 7e
Java : How to Program - 7eJava : How to Program - 7e
Java : How to Program - 7eCHIH-PEI WEN
 
820 6359-13
820 6359-13820 6359-13
820 6359-13ramuktg
 

Similar to Microservices with Dockers and Kubernetes (20)

Docker containerization cookbook
Docker containerization cookbookDocker containerization cookbook
Docker containerization cookbook
 
ScalaCheck Cookbook v1.0
ScalaCheck Cookbook v1.0ScalaCheck Cookbook v1.0
ScalaCheck Cookbook v1.0
 
Ref arch for ve sg248155
Ref arch for ve sg248155Ref arch for ve sg248155
Ref arch for ve sg248155
 
Livre blanc technique sur l’architecture de référence
Livre blanc technique sur l’architecture de référenceLivre blanc technique sur l’architecture de référence
Livre blanc technique sur l’architecture de référence
 
Guia do usuario para interface web do at 8000 s
Guia do usuario para interface web do at 8000 sGuia do usuario para interface web do at 8000 s
Guia do usuario para interface web do at 8000 s
 
Dpdmf en
Dpdmf enDpdmf en
Dpdmf en
 
Qtp user-guide
Qtp user-guideQtp user-guide
Qtp user-guide
 
Load runner generator
Load runner generatorLoad runner generator
Load runner generator
 
Open acc.1.0
Open acc.1.0Open acc.1.0
Open acc.1.0
 
spring-security-reference.pdf
spring-security-reference.pdfspring-security-reference.pdf
spring-security-reference.pdf
 
Coherence developer's guide
Coherence developer's guideCoherence developer's guide
Coherence developer's guide
 
Qtp In Depth
Qtp In DepthQtp In Depth
Qtp In Depth
 
Load runner controller
Load runner controllerLoad runner controller
Load runner controller
 
Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2
 
Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-en
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-en
 
Tellurium 0.6.0 User Guide
Tellurium 0.6.0 User GuideTellurium 0.6.0 User Guide
Tellurium 0.6.0 User Guide
 
Java : How to Program - 7e
Java : How to Program - 7eJava : How to Program - 7e
Java : How to Program - 7e
 
820 6359-13
820 6359-13820 6359-13
820 6359-13
 

More from Manish Chopra

AWS and Slack Integration - Sending CloudWatch Notifications to Slack.pdf
AWS and Slack Integration - Sending CloudWatch Notifications to Slack.pdfAWS and Slack Integration - Sending CloudWatch Notifications to Slack.pdf
AWS and Slack Integration - Sending CloudWatch Notifications to Slack.pdfManish Chopra
 
Getting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdfGetting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdfManish Chopra
 
Grafana and AWS - Implementation and Usage
Grafana and AWS - Implementation and UsageGrafana and AWS - Implementation and Usage
Grafana and AWS - Implementation and UsageManish Chopra
 
Containers Auto Scaling on AWS.pdf
Containers Auto Scaling on AWS.pdfContainers Auto Scaling on AWS.pdf
Containers Auto Scaling on AWS.pdfManish Chopra
 
OpenKM Solution Document
OpenKM Solution DocumentOpenKM Solution Document
OpenKM Solution DocumentManish Chopra
 
Alfresco Content Services - Solution Document
Alfresco Content Services - Solution DocumentAlfresco Content Services - Solution Document
Alfresco Content Services - Solution DocumentManish Chopra
 
Jenkins Study Guide ToC
Jenkins Study Guide ToCJenkins Study Guide ToC
Jenkins Study Guide ToCManish Chopra
 
Ansible Study Guide ToC
Ansible Study Guide ToCAnsible Study Guide ToC
Ansible Study Guide ToCManish Chopra
 
Unix and Linux Operating Systems
Unix and Linux Operating SystemsUnix and Linux Operating Systems
Unix and Linux Operating SystemsManish Chopra
 
Working with Hive Analytics
Working with Hive AnalyticsWorking with Hive Analytics
Working with Hive AnalyticsManish Chopra
 
Preparing a Dataset for Processing
Preparing a Dataset for ProcessingPreparing a Dataset for Processing
Preparing a Dataset for ProcessingManish Chopra
 
Organizations with largest hadoop clusters
Organizations with largest hadoop clustersOrganizations with largest hadoop clusters
Organizations with largest hadoop clustersManish Chopra
 
Distributed File Systems
Distributed File SystemsDistributed File Systems
Distributed File SystemsManish Chopra
 
Difference between hadoop 2 vs hadoop 3
Difference between hadoop 2 vs hadoop 3Difference between hadoop 2 vs hadoop 3
Difference between hadoop 2 vs hadoop 3Manish Chopra
 
Oracle solaris 11 installation
Oracle solaris 11 installationOracle solaris 11 installation
Oracle solaris 11 installationManish Chopra
 
Big Data Analytics Course Guide TOC
Big Data Analytics Course Guide TOCBig Data Analytics Course Guide TOC
Big Data Analytics Course Guide TOCManish Chopra
 
Emergence and Importance of Cloud Computing for the Enterprise
Emergence and Importance of Cloud Computing for the EnterpriseEmergence and Importance of Cloud Computing for the Enterprise
Emergence and Importance of Cloud Computing for the EnterpriseManish Chopra
 
Steps to create an RPM package in Linux
Steps to create an RPM package in LinuxSteps to create an RPM package in Linux
Steps to create an RPM package in LinuxManish Chopra
 
Setting up a HADOOP 2.2 cluster on CentOS 6
Setting up a HADOOP 2.2 cluster on CentOS 6Setting up a HADOOP 2.2 cluster on CentOS 6
Setting up a HADOOP 2.2 cluster on CentOS 6Manish Chopra
 
The Anatomy of GOOGLE Search Engine
The Anatomy of GOOGLE Search EngineThe Anatomy of GOOGLE Search Engine
The Anatomy of GOOGLE Search EngineManish Chopra
 

More from Manish Chopra (20)

AWS and Slack Integration - Sending CloudWatch Notifications to Slack.pdf
AWS and Slack Integration - Sending CloudWatch Notifications to Slack.pdfAWS and Slack Integration - Sending CloudWatch Notifications to Slack.pdf
AWS and Slack Integration - Sending CloudWatch Notifications to Slack.pdf
 
Getting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdfGetting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdf
 
Grafana and AWS - Implementation and Usage
Grafana and AWS - Implementation and UsageGrafana and AWS - Implementation and Usage
Grafana and AWS - Implementation and Usage
 
Containers Auto Scaling on AWS.pdf
Containers Auto Scaling on AWS.pdfContainers Auto Scaling on AWS.pdf
Containers Auto Scaling on AWS.pdf
 
OpenKM Solution Document
OpenKM Solution DocumentOpenKM Solution Document
OpenKM Solution Document
 
Alfresco Content Services - Solution Document
Alfresco Content Services - Solution DocumentAlfresco Content Services - Solution Document
Alfresco Content Services - Solution Document
 
Jenkins Study Guide ToC
Jenkins Study Guide ToCJenkins Study Guide ToC
Jenkins Study Guide ToC
 
Ansible Study Guide ToC
Ansible Study Guide ToCAnsible Study Guide ToC
Ansible Study Guide ToC
 
Unix and Linux Operating Systems
Unix and Linux Operating SystemsUnix and Linux Operating Systems
Unix and Linux Operating Systems
 
Working with Hive Analytics
Working with Hive AnalyticsWorking with Hive Analytics
Working with Hive Analytics
 
Preparing a Dataset for Processing
Preparing a Dataset for ProcessingPreparing a Dataset for Processing
Preparing a Dataset for Processing
 
Organizations with largest hadoop clusters
Organizations with largest hadoop clustersOrganizations with largest hadoop clusters
Organizations with largest hadoop clusters
 
Distributed File Systems
Distributed File SystemsDistributed File Systems
Distributed File Systems
 
Difference between hadoop 2 vs hadoop 3
Difference between hadoop 2 vs hadoop 3Difference between hadoop 2 vs hadoop 3
Difference between hadoop 2 vs hadoop 3
 
Oracle solaris 11 installation
Oracle solaris 11 installationOracle solaris 11 installation
Oracle solaris 11 installation
 
Big Data Analytics Course Guide TOC
Big Data Analytics Course Guide TOCBig Data Analytics Course Guide TOC
Big Data Analytics Course Guide TOC
 
Emergence and Importance of Cloud Computing for the Enterprise
Emergence and Importance of Cloud Computing for the EnterpriseEmergence and Importance of Cloud Computing for the Enterprise
Emergence and Importance of Cloud Computing for the Enterprise
 
Steps to create an RPM package in Linux
Steps to create an RPM package in LinuxSteps to create an RPM package in Linux
Steps to create an RPM package in Linux
 
Setting up a HADOOP 2.2 cluster on CentOS 6
Setting up a HADOOP 2.2 cluster on CentOS 6Setting up a HADOOP 2.2 cluster on CentOS 6
Setting up a HADOOP 2.2 cluster on CentOS 6
 
The Anatomy of GOOGLE Search Engine
The Anatomy of GOOGLE Search EngineThe Anatomy of GOOGLE Search Engine
The Anatomy of GOOGLE Search Engine
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 

Recently uploaded (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 

Microservices with Dockers and Kubernetes

  • 1. Microservices - Docker & Kubernetes Study Guide
  • 2. MICROSERVICES - DOCKER & KUBERNETES __________________________________________________________________________________ Page 1 Microservices - Dockers and Kubernetes Table of Contents Preface ................................................................................................................................................3 1 Monolithic and Microservices...............................................................................................................4 1.1 Introduction to Microservices.................................................................................................5 1.2 Monolithic vs. Microservices vs. SOA .....................................................................................7 1.3 Moving from Monolithic to Microservices .............................................................................9 1.4 Microservices Architecture and Best Practices.....................................................................10 1.5 Microservices Design Patterns and Strategies......................................................................13 Lab Exercise 1....................................................................................................................................17 Lab Exercise 2....................................................................................................................................22 Lab Exercise 3....................................................................................................................................29 2 Starting with Linux Containers............................................................................................................32 2.1 Introduction to Linux Containers..........................................................................................33 2.2 Containers vs. Virtual Machines ...........................................................................................36 2.3 Docker Basics - Components and Architecture.....................................................................37 2.4 Docker Installation and Configuration..................................................................................41 2.5 Application considerations ...................................................................................................41 Lab Exercise 1....................................................................................................................................45 Lab Exercise 2....................................................................................................................................47 Lab Exercise 3....................................................................................................................................49 3 Working with Docker - Part 1..............................................................................................................50 3.1 Running Docker Images ........................................................................................................51 3.2 Transaction Management in Microservices..........................................................................52 3.3 Managing Containerized Applications ..................................................................................53 3.4 Container Lifecycle................................................................................................................55 4 Working with Docker - Part 2..............................................................................................................57 4.1 Accessing Images from Docker Hub......................................................................................58 4.2 Building Images using Dockerfile ..........................................................................................59 4.3 Docker Networking ...............................................................................................................68 4.4 Docker Volumes....................................................................................................................74 4.5 Container migration and packaging......................................................................................79 4.6 Challenges in Deploying Docker Containers .........................................................................80 Lab Exercise 1....................................................................................................................................83
  • 3. MICROSERVICES - DOCKER & KUBERNETES __________________________________________________________________________________ Page 2 Lab Exercise 2....................................................................................................................................84 Lab Exercise 3....................................................................................................................................84 Lab Exercise 4....................................................................................................................................86 Lab Exercise 5....................................................................................................................................87 Lab Exercise 6....................................................................................................................................88 5 Working with Docker - Part 3..............................................................................................................91 5.1 Using Docker Compose.........................................................................................................92 5.2 Monitoring Docker................................................................................................................93 5.3 Docker Security.....................................................................................................................95 5.4 Docker Registry .....................................................................................................................98 Lab Exercise (Optional) .....................................................................................................................99 6 Working with Docker - Part 4............................................................................................................101 6.1 Using Security tools for Docker...........................................................................................102 6.2 Docker's Built-in Security Features.....................................................................................102 6.3 Docker security best practices............................................................................................102 7 Starting with Kubernetes ..................................................................................................................104 7.1 Key Concepts in Kubernetes ...............................................................................................105 7.2 Kubernetes Cluster Architecture.........................................................................................105 7.3 Networking models (CNI vs CNM).......................................................................................107 7.4 Kubernetes Cluster Planning...............................................................................................110 7.5 Installing and Configuring Master Controller......................................................................112 7.6 Installing and Configuring Nodes/Minions .........................................................................115 7.7 Kubernetes Commands.......................................................................................................118 Lab Exercise.....................................................................................................................................119 8 Advanced Kubernetes.......................................................................................................................122 8.1 Kubernetes Cluster Management.......................................................................................123 8.2 Create and Deploy Pod Definitions.....................................................................................123 8.3 Configure Pods and Containers...........................................................................................124 8.4 Volume management with PODs........................................................................................126 8.5 Networking In Kubernetes..................................................................................................127 8.6 Commands in Kubernetes...................................................................................................130 8.7 Run Applications on Kubernetes Cluster ............................................................................132 8.8 Kubernetes vs. Docker Swarm ............................................................................................137
  • 4. MICROSERVICES - DOCKER & KUBERNETES __________________________________________________________________________________ Page 3 PREFACE Microservices have been a growing trend in the last few years and organizations have felt the need to adopt them to keep up with the changing IT landscape. The Docker project started in 2013 is a Linux based service and forms a foundation for running Microservices. Later, the Kubernetes project was developed by Google for deploying, automating, scaling and managing containerized applications in a cluster. This is a customized study guide to get started with Microservices - Docker and Kubernetes. About two decades ago, IT and computing industry had a limited set of matured technologies. Further back in time, there were still lesser technologies available to explore for our projects. At present, there are numerous technologies, standards, computing languages and platforms, among others available to choose from. Present day projects require the right planning and execution to last long. There are numerous open source applications available in the opensource doman. Github.com and Hub.docker.com are very popular among the developer community, and you can branch out one or more of project available there to get started with your project, without reinventing the wheel. This guide attempts to bridge the gap in the least possible time, and covers the essentials features to get started with Microservices, Docker, and Kubernetes. After reading through the text, and by practicilng the examples, you will get familiarised with developing and deploying Microservices on Docker and Kubernetes platforms. Author Manish Chopra (December 2017)