SlideShare a Scribd company logo
Microservices
Docker
CI/CD
Kubernetes
About me...
Ishara Fernando
DevOps/CloudOps Technical Specialist
Pearson
KCA , AWS - ASOA , AWS-ADEV,AWS-ASA
RHCSA,RHCE,RHCVA , ITIL
BSc in Computer Science
MSc in Security Engineering
UI Process Components (UIP)
Services
Data
Sources
Service Gateways
(SG)
Data Access
Component (DAC)
Service Interfaces (SI)
Business
Workflow (BW)
UI Components (UIC)
Users
C
o
m
m
u
n
i
c
a
t
i
o
n
O
p
e
r
a
ti
o
n
a
l
M
a
n
a
g
e
m
e
n
t
S
e
c
u
r
i
t
y
Business
Workflow (BW)
Business
Workflow (BW)
General Architecture
Monoliths
● Single Deployment
● Single Runtime
● Single Codebase
● Interaction between classes is most often
synchronous
Application
Server 1
Server 2
Server 3
Microservices
● Many small modules with specific functionality
● More than one codebase
● Every microservice is a separate deployment
● Every microservices has its own DB
● Ensures module independence
App 1 App 2
Server 1
Server 2Server 4
Monoliths vs Microservices
Benefits of Microservices
● Modelled around the business domain
● Deployment Automation culture
● Every microservice is a separate deployment
● Every microservices has its own DB
● Ensures module independence
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices Use Cases
● Multiple teams
● Memory or CPU intensive parts
- To ease development
● Short-lived, Spawn workers
Challenges of Microservices CI/CD
● Lots of independent teams want their own
- Flexible pipeline
- Environments(Dev/IST/UAT/Prod)
- Resources(Compute, Network, Storage)
● Automation because we have lots of
microservices
- Creation of projects, CD pipelines, environments,
releases, etc.
Django web
frontend
? ? ? ? ? ?
Node.js
async API
? ? ? ? ? ?
Background
workers
? ? ? ? ? ?
SQL
database
? ? ? ? ? ?
Distributed
DB, big data
? ? ? ? ? ?
Message
queue
? ? ? ? ? ?
My laptop Your laptop QA Staging
Prod on
cloud VM
Prod on bare
metal
The Matrix from Hell
Solution to the deployment
problem?
The
Linux
Container...
Linux Containers
● Units of software delivery (Ship it!)
● Run everywhere
- Regardless of kernel version
- Regardless of host distro
- (But container and host architecture must match*)
● Run anything
- If it can run on the host, it can run in the container
- i.e., if it can run on a Linux kernel, it can run
High level approach:
it’s a lightweight VM
● Own process space
● Own network interface
● Can run stuff as root
Machine Container
Low level approach:
it’s chroot on steroids
● Container = Isolated process(es)
● Share kernel with host
● No device emulation (neither HVM nor PV)
Application Container
Separation and Isolation
● Inside my container:
- My code
- My libraries
- My package manager
- My app
- My data
How does it work?
Isolation with cgroups
● Memory
● CPU
● blkio
● Devices
Why do you want to run your
application inside containers?
Container Advantages
● Lightweight footprint and minimal overhead
● Probability across machines
● Empower Microservices Architectures
● Speeds up Continuous Integration
● Simplify DevOps practices
● Isolation
App1
Bins/Libs
Guest OS
Hypervisor
App2
Bins/Libs
Guest OS
App3
Bins/Libs
Guest OS
Host Operating System
Infrastructure
App1
Bins/Libs
Container Engine
App2
Bins/Libs
App3
Bins/Libs
Host Operating System
Infrastructure
Virtual Machines vs Containers
$ docker run -d <image-name>
A single and isolated Linux
process running on a single
machine.
A way to
run a Linux
container
● An Open-Source (Go) framework to
manage “container virtualization”.
● Docker isolates multiple user spaces
(file systems) inside the same host.
● The user space instances are called
“Containers”.
● Docker containers are much smaller
than full VMs, making it easy to
share.
● Used by Google Cloud (with the
Container Engine + Kubernetes).
Docker
DevOps Challenges for Multiple Containers
● How to scale?
● How to avoid port conflicts?
● How to manage them in multiple hosts?
● What happens if a host has a trouble?
● How to keep them running?
● How to update them?
● Where are my containers?
Meet
Kubernetes!!!
Kubernetes
● Greek for “Helmsman”; also the
root of the word “Governor”.
● Container Orchestrator.
● Supports multiple cloud and
bare-metal environments.
● Inspired by Google's’ experience
with containers.
● Open Source, written in Go.
● Manage Applications, not
Machines.
History of Kubernetes
● Earlier know as “Brog”.
● Brog -> Omega -> Kubernetes
● Google used MPM(Midas
Package Manager) to build
and deploy container images.
B
r
o
g
Gmail
Search
Google
Cloud
Ads
VMs
Containers
How google does it?
Open Source Community
Project
Version 1.3
Hosted on Github
800+ contributors
3000+ commits
16000+ Github stars
Project
RedHat CoreOS
HP Pivotal
IBM SaltStack
Mesosphere VMWare
Microsoft
https://kubernetes.io/
https://github.com/kubernetes/kubernetes
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Kubernetes Concepts
Pod
One or more containers
Shared IP
Shared Storage Volume
Shared Resources
Shared Lifecycle
Replication
Controller
Ensures that a specified
number of pod replicas
are running at a time.
Service
Grouping of pods, act
as one.
Has a stable virtual IP
and DNS name.
Label
Key-value pairs
associated with
Kubernetes objects.
Ex: env=prod
Pods
● Group of containers
● Live and die together
● Share
- IP
- Secrets
- Volumes
- Labels
Labels
Application
Administrative
Console
Log Collector
Volume
IP: 10.x.x.x
Labels
“Everything runs on Kubernetes can have a label”
Node
App: Cool
Env: Dev
Version: 1.0
Node
App: Cool
Env: Prod
Version: 1.0
Node
App: Cool
Env: Dev
Version: 2.0
Node
App: Cool
Env: Prod
Version: 2.0
Labels
Node Node
Node Node
App: Cool
Env: Prod
Version: 1.0
App: Cool
Env: Prod
Version: 2.0
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Dev
Version: 2.0
Labels
Node
Node
App: Cool
Env: Dev
Version: 2.0
App: Cool
Env: Prod
Version: 2.0
Node
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Prod
Version: 1.0
Node
Services
Service
Label Selector:
● App=Cool
● Env=Prod
IP: 127.x.x.x
Node 1
POD
Node 2
POD
POD
App: Cool
Env: Prod
Version: 1.0
App: Nice
Env: Prod
Version: 1.0
Service Discovery
Using environmental variables:
Using Internal DNS: $ping mysql
How do we deliver value
fast(and safely)?
Continuous delivery of containerized
microservices.
Continuous Delivery and Automation are Key
$
Development
The Business
Feedback Loop
Production
Commit Build Test Stage Deploy
Deploying WordPress and MySQL with
Persistent Volumes
Create a persistent volume
Client Device Cloud Provider
Web User
Persistent
Volume
Persistent
Volume
Deploying WordPress and MySQL with
Persistent Volumes
Create a persistent volume
Create a persistent
volume
Create a persistent
volume
Create a secret
Deploy MySQLDeploy WordPress
Create a Persistent Volume
kubectl create -f local-volumes.yaml
List Persistent Volumes
kubectl get pv
Persistent Volume
Create a Secret
kubectl create secret generic mysql-pass
--from-literal=password=YOUR_PASSWORD
List Secrets
kubectl get secrets
Secret
Deploy MySQL
kubectl create -f mysql-deployment.yaml
List Pods
kubectl get pods
Deploy MySQL
Deploy WordPress
kubectl create -f wordpress-deployment.yaml
List Pods
kubectl get services wordpress
Deploy WordPress
Questions???
Thank You...
Ad

More Related Content

What's hot (20)

WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
Brian Grant
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Stanislav Pogrebnyak
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
rajdeep
 
Kubernetes - Starting with 1.2
Kubernetes  - Starting with 1.2Kubernetes  - Starting with 1.2
Kubernetes - Starting with 1.2
William Stewart
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
Carlos Sanchez
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
Sparkbit
 
kubernetes for beginners
kubernetes for beginnerskubernetes for beginners
kubernetes for beginners
Dominique Dumont
 
Microservices at scale with docker and kubernetes - AMS JUG 2017
Microservices at scale with docker and kubernetes - AMS JUG 2017Microservices at scale with docker and kubernetes - AMS JUG 2017
Microservices at scale with docker and kubernetes - AMS JUG 2017
Arjen Wassink
 
Docker Madison, Introduction to Kubernetes
Docker Madison, Introduction to KubernetesDocker Madison, Introduction to Kubernetes
Docker Madison, Introduction to Kubernetes
Timothy St. Clair
 
Orchestrating Docker Containers with Google Kubernetes on OpenStack
Orchestrating Docker Containers with Google Kubernetes on OpenStackOrchestrating Docker Containers with Google Kubernetes on OpenStack
Orchestrating Docker Containers with Google Kubernetes on OpenStack
Trevor Roberts Jr.
 
Cantainer CI/ CD with Kubernetes
Cantainer CI/ CD with KubernetesCantainer CI/ CD with Kubernetes
Cantainer CI/ CD with Kubernetes
inwin stack
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
EastBanc Tachnologies
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Martin Danielsson
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
Rohman Muhamad
 
Kubernetes automation in production
Kubernetes automation in productionKubernetes automation in production
Kubernetes automation in production
Paul Bakker
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid Deployments
Sandeep Parikh
 
Understanding Kubernetes
Understanding KubernetesUnderstanding Kubernetes
Understanding Kubernetes
Tu Pham
 
Monitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on KubernetesMonitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on Kubernetes
Martin Etmajer
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Red Hat Developers
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10
Vishnu Kannan
 
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
Brian Grant
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
rajdeep
 
Kubernetes - Starting with 1.2
Kubernetes  - Starting with 1.2Kubernetes  - Starting with 1.2
Kubernetes - Starting with 1.2
William Stewart
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
Carlos Sanchez
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
Sparkbit
 
Microservices at scale with docker and kubernetes - AMS JUG 2017
Microservices at scale with docker and kubernetes - AMS JUG 2017Microservices at scale with docker and kubernetes - AMS JUG 2017
Microservices at scale with docker and kubernetes - AMS JUG 2017
Arjen Wassink
 
Docker Madison, Introduction to Kubernetes
Docker Madison, Introduction to KubernetesDocker Madison, Introduction to Kubernetes
Docker Madison, Introduction to Kubernetes
Timothy St. Clair
 
Orchestrating Docker Containers with Google Kubernetes on OpenStack
Orchestrating Docker Containers with Google Kubernetes on OpenStackOrchestrating Docker Containers with Google Kubernetes on OpenStack
Orchestrating Docker Containers with Google Kubernetes on OpenStack
Trevor Roberts Jr.
 
Cantainer CI/ CD with Kubernetes
Cantainer CI/ CD with KubernetesCantainer CI/ CD with Kubernetes
Cantainer CI/ CD with Kubernetes
inwin stack
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
Rohman Muhamad
 
Kubernetes automation in production
Kubernetes automation in productionKubernetes automation in production
Kubernetes automation in production
Paul Bakker
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid Deployments
Sandeep Parikh
 
Understanding Kubernetes
Understanding KubernetesUnderstanding Kubernetes
Understanding Kubernetes
Tu Pham
 
Monitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on KubernetesMonitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on Kubernetes
Martin Etmajer
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10
Vishnu Kannan
 

Similar to Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka (20)

Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Vishwas N
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
NETWAYS
 
Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1
Binary Studio
 
Kubernetes is all you need
Kubernetes is all you needKubernetes is all you need
Kubernetes is all you need
Vishwas N
 
Understanding Docker and IBM Bluemix Container Service
Understanding Docker and IBM Bluemix Container ServiceUnderstanding Docker and IBM Bluemix Container Service
Understanding Docker and IBM Bluemix Container Service
Andrew Ferrier
 
ma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptxma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptx
imenhamada17
 
Oscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectOscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby project
Patrick Chanezon
 
Meteor South Bay Meetup - Kubernetes & Google Container Engine
Meteor South Bay Meetup - Kubernetes & Google Container EngineMeteor South Bay Meetup - Kubernetes & Google Container Engine
Meteor South Bay Meetup - Kubernetes & Google Container Engine
Kit Merker
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containers
inovex GmbH
 
Cont0519
Cont0519Cont0519
Cont0519
Samuel Dratwa
 
Docker-Intro
Docker-IntroDocker-Intro
Docker-Intro
Sujai Sivasamy
 
Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1
Binary Studio
 
Techdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosTechdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err Microcosmos
Mike Martin
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
Haggai Philip Zagury
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
javaonfly
 
Microservices and containers for the unitiated
Microservices and containers for the unitiatedMicroservices and containers for the unitiated
Microservices and containers for the unitiated
Kevin Lee
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
Gayan Gunarathne
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
Gayan Gunarathne
 
Weave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapWeave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 Recap
Patrick Chanezon
 
Why kubernetes for Serverless (FaaS)
Why kubernetes for Serverless (FaaS)Why kubernetes for Serverless (FaaS)
Why kubernetes for Serverless (FaaS)
Krishna-Kumar
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Vishwas N
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
NETWAYS
 
Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1
Binary Studio
 
Kubernetes is all you need
Kubernetes is all you needKubernetes is all you need
Kubernetes is all you need
Vishwas N
 
Understanding Docker and IBM Bluemix Container Service
Understanding Docker and IBM Bluemix Container ServiceUnderstanding Docker and IBM Bluemix Container Service
Understanding Docker and IBM Bluemix Container Service
Andrew Ferrier
 
ma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptxma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptx
imenhamada17
 
Oscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectOscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby project
Patrick Chanezon
 
Meteor South Bay Meetup - Kubernetes & Google Container Engine
Meteor South Bay Meetup - Kubernetes & Google Container EngineMeteor South Bay Meetup - Kubernetes & Google Container Engine
Meteor South Bay Meetup - Kubernetes & Google Container Engine
Kit Merker
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containers
inovex GmbH
 
Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1
Binary Studio
 
Techdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosTechdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err Microcosmos
Mike Martin
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
Haggai Philip Zagury
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
javaonfly
 
Microservices and containers for the unitiated
Microservices and containers for the unitiatedMicroservices and containers for the unitiated
Microservices and containers for the unitiated
Kevin Lee
 
Weave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapWeave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 Recap
Patrick Chanezon
 
Why kubernetes for Serverless (FaaS)
Why kubernetes for Serverless (FaaS)Why kubernetes for Serverless (FaaS)
Why kubernetes for Serverless (FaaS)
Krishna-Kumar
 
Ad

Recently uploaded (20)

YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Ad

Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka

  • 2. About me... Ishara Fernando DevOps/CloudOps Technical Specialist Pearson KCA , AWS - ASOA , AWS-ADEV,AWS-ASA RHCSA,RHCE,RHCVA , ITIL BSc in Computer Science MSc in Security Engineering
  • 3. UI Process Components (UIP) Services Data Sources Service Gateways (SG) Data Access Component (DAC) Service Interfaces (SI) Business Workflow (BW) UI Components (UIC) Users C o m m u n i c a t i o n O p e r a ti o n a l M a n a g e m e n t S e c u r i t y Business Workflow (BW) Business Workflow (BW) General Architecture
  • 5. ● Single Deployment ● Single Runtime ● Single Codebase ● Interaction between classes is most often synchronous Application Server 1 Server 2 Server 3
  • 7. ● Many small modules with specific functionality ● More than one codebase ● Every microservice is a separate deployment ● Every microservices has its own DB ● Ensures module independence App 1 App 2 Server 1 Server 2Server 4
  • 9. Benefits of Microservices ● Modelled around the business domain ● Deployment Automation culture ● Every microservice is a separate deployment ● Every microservices has its own DB ● Ensures module independence
  • 11. Microservices Use Cases ● Multiple teams ● Memory or CPU intensive parts - To ease development ● Short-lived, Spawn workers
  • 12. Challenges of Microservices CI/CD ● Lots of independent teams want their own - Flexible pipeline - Environments(Dev/IST/UAT/Prod) - Resources(Compute, Network, Storage) ● Automation because we have lots of microservices - Creation of projects, CD pipelines, environments, releases, etc.
  • 13. Django web frontend ? ? ? ? ? ? Node.js async API ? ? ? ? ? ? Background workers ? ? ? ? ? ? SQL database ? ? ? ? ? ? Distributed DB, big data ? ? ? ? ? ? Message queue ? ? ? ? ? ? My laptop Your laptop QA Staging Prod on cloud VM Prod on bare metal The Matrix from Hell
  • 14. Solution to the deployment problem? The Linux Container...
  • 15. Linux Containers ● Units of software delivery (Ship it!) ● Run everywhere - Regardless of kernel version - Regardless of host distro - (But container and host architecture must match*) ● Run anything - If it can run on the host, it can run in the container - i.e., if it can run on a Linux kernel, it can run
  • 16. High level approach: it’s a lightweight VM ● Own process space ● Own network interface ● Can run stuff as root Machine Container
  • 17. Low level approach: it’s chroot on steroids ● Container = Isolated process(es) ● Share kernel with host ● No device emulation (neither HVM nor PV) Application Container
  • 18. Separation and Isolation ● Inside my container: - My code - My libraries - My package manager - My app - My data
  • 19. How does it work? Isolation with cgroups ● Memory ● CPU ● blkio ● Devices
  • 20. Why do you want to run your application inside containers?
  • 21. Container Advantages ● Lightweight footprint and minimal overhead ● Probability across machines ● Empower Microservices Architectures ● Speeds up Continuous Integration ● Simplify DevOps practices ● Isolation
  • 22. App1 Bins/Libs Guest OS Hypervisor App2 Bins/Libs Guest OS App3 Bins/Libs Guest OS Host Operating System Infrastructure App1 Bins/Libs Container Engine App2 Bins/Libs App3 Bins/Libs Host Operating System Infrastructure Virtual Machines vs Containers
  • 23. $ docker run -d <image-name> A single and isolated Linux process running on a single machine. A way to run a Linux container
  • 24. ● An Open-Source (Go) framework to manage “container virtualization”. ● Docker isolates multiple user spaces (file systems) inside the same host. ● The user space instances are called “Containers”. ● Docker containers are much smaller than full VMs, making it easy to share. ● Used by Google Cloud (with the Container Engine + Kubernetes). Docker
  • 25. DevOps Challenges for Multiple Containers ● How to scale? ● How to avoid port conflicts? ● How to manage them in multiple hosts? ● What happens if a host has a trouble? ● How to keep them running? ● How to update them? ● Where are my containers?
  • 27. Kubernetes ● Greek for “Helmsman”; also the root of the word “Governor”. ● Container Orchestrator. ● Supports multiple cloud and bare-metal environments. ● Inspired by Google's’ experience with containers. ● Open Source, written in Go. ● Manage Applications, not Machines.
  • 28. History of Kubernetes ● Earlier know as “Brog”. ● Brog -> Omega -> Kubernetes ● Google used MPM(Midas Package Manager) to build and deploy container images. B r o g Gmail Search Google Cloud Ads VMs Containers
  • 30. Open Source Community Project Version 1.3 Hosted on Github 800+ contributors 3000+ commits 16000+ Github stars Project RedHat CoreOS HP Pivotal IBM SaltStack Mesosphere VMWare Microsoft https://kubernetes.io/ https://github.com/kubernetes/kubernetes
  • 32. Kubernetes Concepts Pod One or more containers Shared IP Shared Storage Volume Shared Resources Shared Lifecycle Replication Controller Ensures that a specified number of pod replicas are running at a time. Service Grouping of pods, act as one. Has a stable virtual IP and DNS name. Label Key-value pairs associated with Kubernetes objects. Ex: env=prod
  • 33. Pods ● Group of containers ● Live and die together ● Share - IP - Secrets - Volumes - Labels Labels Application Administrative Console Log Collector Volume IP: 10.x.x.x
  • 34. Labels “Everything runs on Kubernetes can have a label” Node App: Cool Env: Dev Version: 1.0 Node App: Cool Env: Prod Version: 1.0 Node App: Cool Env: Dev Version: 2.0 Node App: Cool Env: Prod Version: 2.0
  • 35. Labels Node Node Node Node App: Cool Env: Prod Version: 1.0 App: Cool Env: Prod Version: 2.0 App: Cool Env: Dev Version: 1.0 App: Cool Env: Dev Version: 2.0
  • 36. Labels Node Node App: Cool Env: Dev Version: 2.0 App: Cool Env: Prod Version: 2.0 Node App: Cool Env: Dev Version: 1.0 App: Cool Env: Prod Version: 1.0 Node
  • 37. Services Service Label Selector: ● App=Cool ● Env=Prod IP: 127.x.x.x Node 1 POD Node 2 POD POD App: Cool Env: Prod Version: 1.0 App: Nice Env: Prod Version: 1.0
  • 38. Service Discovery Using environmental variables: Using Internal DNS: $ping mysql
  • 39. How do we deliver value fast(and safely)? Continuous delivery of containerized microservices.
  • 40. Continuous Delivery and Automation are Key $ Development The Business Feedback Loop Production Commit Build Test Stage Deploy
  • 41. Deploying WordPress and MySQL with Persistent Volumes Create a persistent volume Client Device Cloud Provider Web User Persistent Volume Persistent Volume
  • 42. Deploying WordPress and MySQL with Persistent Volumes Create a persistent volume Create a persistent volume Create a persistent volume Create a secret Deploy MySQLDeploy WordPress
  • 43. Create a Persistent Volume kubectl create -f local-volumes.yaml List Persistent Volumes kubectl get pv Persistent Volume
  • 44. Create a Secret kubectl create secret generic mysql-pass --from-literal=password=YOUR_PASSWORD List Secrets kubectl get secrets Secret
  • 45. Deploy MySQL kubectl create -f mysql-deployment.yaml List Pods kubectl get pods Deploy MySQL
  • 46. Deploy WordPress kubectl create -f wordpress-deployment.yaml List Pods kubectl get services wordpress Deploy WordPress