SlideShare ist ein Scribd-Unternehmen logo
1 von 48
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 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
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...

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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...
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Kubernetes - Starting with 1.2
Kubernetes  - Starting with 1.2Kubernetes  - Starting with 1.2
Kubernetes - Starting with 1.2
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
 
kubernetes for beginners
kubernetes for beginnerskubernetes for beginners
kubernetes for beginners
 
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
 
Docker Madison, Introduction to Kubernetes
Docker Madison, Introduction to KubernetesDocker Madison, Introduction to Kubernetes
Docker Madison, Introduction to Kubernetes
 
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
 
Cantainer CI/ CD with Kubernetes
Cantainer CI/ CD with KubernetesCantainer CI/ CD with Kubernetes
Cantainer CI/ CD with Kubernetes
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Kubernetes automation in production
Kubernetes automation in productionKubernetes automation in production
Kubernetes automation in production
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid Deployments
 
Understanding Kubernetes
Understanding KubernetesUnderstanding Kubernetes
Understanding Kubernetes
 
Monitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on KubernetesMonitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on Kubernetes
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10
 

Ähnlich wie Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka

Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
javaonfly
 

Ähnlich wie Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka (20)

Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
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...
 
Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1
 
Kubernetes is all you need
Kubernetes is all you needKubernetes is all you need
Kubernetes is all you need
 
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
 
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
 
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
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containers
 
Cont0519
Cont0519Cont0519
Cont0519
 
Docker-Intro
Docker-IntroDocker-Intro
Docker-Intro
 
Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1
 
Techdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosTechdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err Microcosmos
 
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
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
 
Microservices and containers for the unitiated
Microservices and containers for the unitiatedMicroservices and containers for the unitiated
Microservices and containers for the unitiated
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 
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
 
Why kubernetes for Serverless (FaaS)
Why kubernetes for Serverless (FaaS)Why kubernetes for Serverless (FaaS)
Why kubernetes for Serverless (FaaS)
 
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless  - Serverless Summit 2017 - Krishna KumarKubernetes for Serverless  - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
 

Kürzlich hochgeladen

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 

Kürzlich hochgeladen (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

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
  • 10.
  • 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
  • 31.
  • 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