SlideShare a Scribd company logo
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_11
Accenture
 
Sybase Adaptive Server Anywhere for Linux
Sybase Adaptive Server Anywhere for LinuxSybase Adaptive Server Anywhere for Linux
Sybase Adaptive Server Anywhere for Linux
marcorinco
 
Odoo development
Odoo developmentOdoo development
Odoo development
Ramzi Hajjaji
 
Maven definitive guide
Maven definitive guideMaven definitive guide
Maven definitive guide
virusworm
 
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
Kesavan Munuswamy
 
Apis php-en sql .
Apis php-en sql .Apis php-en sql .
Apis php-en sql .
Vandan Kashyap
 
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_edition
ABDUmomo
 
Firewall and proxy servers howto
Firewall and proxy servers howtoFirewall and proxy servers howto
Firewall and proxy servers howto
Kumar
 
iPlanet to HP Apache Migration Plan
iPlanet to HP Apache Migration PlaniPlanet to HP Apache Migration Plan
iPlanet to HP Apache Migration Plan
webhostingguy
 
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-en
Anh Vuong
 
Book hudson
Book hudsonBook hudson
Book hudson
Suresh Kumar
 
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
Javier 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 instance
David Muise
 
Spring Reference
Spring ReferenceSpring Reference
Spring Reference
Syed 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 Asterisk
Cef Espinoza
 
Selenium python
Selenium pythonSelenium python
Selenium python
Firdos jahan
 
Diesel to Solar
Diesel to SolarDiesel to Solar
Diesel to Solar
EAI
 

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 cookbook
Pascal Louis
 
ScalaCheck Cookbook v1.0
ScalaCheck Cookbook v1.0ScalaCheck Cookbook v1.0
ScalaCheck Cookbook v1.0
Oscar Renalias
 
Ref arch for ve sg248155
Ref arch for ve sg248155Ref arch for ve sg248155
Ref arch for ve sg248155
Accenture
 
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
Microsoft 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 s
NetPlus
 
Dpdmf en
Dpdmf enDpdmf en
Qtp user-guide
Qtp user-guideQtp user-guide
Qtp user-guide
Jenny Nguyen
 
Load runner generator
Load runner generatorLoad runner generator
Load runner generator
mohan987654
 
Open acc.1.0
Open acc.1.0Open acc.1.0
Open acc.1.0
shengmingzhiyu
 
spring-security-reference.pdf
spring-security-reference.pdfspring-security-reference.pdf
spring-security-reference.pdf
horica9300
 
Coherence developer's guide
Coherence developer's guideCoherence developer's guide
Coherence developer's guide
wangdun119
 
Qtp In Depth
Qtp In DepthQtp In Depth
Qtp In Depth
Alok
 
Load runner controller
Load runner controllerLoad runner controller
Load runner controller
Ashwin 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-2
Sal 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-2
Sal Marcus
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-en
Rifky Rachman
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-en
Rifky Rachman
 
Tellurium 0.6.0 User Guide
Tellurium 0.6.0 User GuideTellurium 0.6.0 User Guide
Tellurium 0.6.0 User Guide
John.Jian.Fang
 
Java : How to Program - 7e
Java : How to Program - 7eJava : How to Program - 7e
Java : How to Program - 7e
CHIH-PEI WEN
 
820 6359-13
820 6359-13820 6359-13
820 6359-13
ramuktg
 

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.pdf
Manish Chopra
 
Getting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdfGetting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdf
Manish Chopra
 
Grafana and AWS - Implementation and Usage
Grafana and AWS - Implementation and UsageGrafana and AWS - Implementation and Usage
Grafana and AWS - Implementation and Usage
Manish Chopra
 
Containers Auto Scaling on AWS.pdf
Containers Auto Scaling on AWS.pdfContainers Auto Scaling on AWS.pdf
Containers Auto Scaling on AWS.pdf
Manish Chopra
 
OpenKM Solution Document
OpenKM Solution DocumentOpenKM Solution Document
OpenKM Solution Document
Manish Chopra
 
Alfresco Content Services - Solution Document
Alfresco Content Services - Solution DocumentAlfresco Content Services - Solution Document
Alfresco Content Services - Solution Document
Manish Chopra
 
Jenkins Study Guide ToC
Jenkins Study Guide ToCJenkins Study Guide ToC
Jenkins Study Guide ToC
Manish Chopra
 
Ansible Study Guide ToC
Ansible Study Guide ToCAnsible Study Guide ToC
Ansible Study Guide ToC
Manish Chopra
 
Unix and Linux Operating Systems
Unix and Linux Operating SystemsUnix and Linux Operating Systems
Unix and Linux Operating Systems
Manish Chopra
 
Working with Hive Analytics
Working with Hive AnalyticsWorking with Hive Analytics
Working with Hive Analytics
Manish Chopra
 
Preparing a Dataset for Processing
Preparing a Dataset for ProcessingPreparing a Dataset for Processing
Preparing a Dataset for Processing
Manish Chopra
 
Organizations with largest hadoop clusters
Organizations with largest hadoop clustersOrganizations with largest hadoop clusters
Organizations with largest hadoop clusters
Manish Chopra
 
Distributed File Systems
Distributed File SystemsDistributed File Systems
Distributed File Systems
Manish 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 3
Manish Chopra
 
Oracle solaris 11 installation
Oracle solaris 11 installationOracle solaris 11 installation
Oracle solaris 11 installation
Manish Chopra
 
Big Data Analytics Course Guide TOC
Big Data Analytics Course Guide TOCBig Data Analytics Course Guide TOC
Big Data Analytics Course Guide TOC
Manish 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 Enterprise
Manish 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 Linux
Manish 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 6
Manish Chopra
 
The Anatomy of GOOGLE Search Engine
The Anatomy of GOOGLE Search EngineThe Anatomy of GOOGLE Search Engine
The Anatomy of GOOGLE Search Engine
Manish 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

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 

Recently uploaded (20)

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 

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)