SlideShare a Scribd company logo
1
Microservices with Docker,
Kubernetes and Jenkins
Rafael Benevides & Christian Posta
@rafabene / @christianposta
http://bit.ly/javaone-kb8s-jenkins
Christian Posta
Principal Middleware Architect at Red Hat
christian@redhat.com
@christianposta
● Author “Microservices for Java Developers”
● Committer Apache Camel, ActiveMQ,
ActiveMQ PMC, Fabric8.io
● Worked with large Microservices, web-scale
companies
● Blogger, speaker about microservices,
DevOps, cloud, distributed systems,
messaging
Rafael Benevides
Director of Developer Experience at Red Hat
Apache DeltaSpike P.M.C
benevides@redhat.com
@rafabene
Java Certifications:
SCJA / SCJP / SCWCD / SCBCD / SCEA
JBoss Certifications:
JBCD / JBCAA
Red Hat Certifications:
OpenShift / Containers / Ansible
Other Certifications:
SAP Netweaver / ITIL / IBM Software Quality
developers.redhat.com
http://developers.redhat.comhttp://developers.redhat.com
@rafabene and @christianposta
Why do you want to run your application inside containers?
@rafabene and @christianposta
● Lightweight footprint and minimal overhead,
● Portability across machines,
● Simplify DevOps practices,
● Speeds up Continuous Integration,
● Empower Microservices Architectures.
● Isolation
Container
Advantages
Container Engine
@rafabene and @christianposta
A way to run a Linux container:
$ docker run -d <image-name>
A single and isolated Linux process
running in a single machine
@rafabene and @christianposta
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?
Node Node
Logger
Node
Node Node Node
@rafabene and @christianposta
Greek for “Helmsman”; also the root of the word
“Governor” (from latin: gubernator)
● 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
Meet Kubernetes
@rafabene and @christianposta
Version 1.3
Hosted on GitHub
800+ contributors
34,000+ commits
16,000+ GitHub stars
Red Hat
HP
IBM
Mesosphere
Microsoft
Project Partners
CoreOS
Pivotal
SaltStack
VMWare
http://kubernetes.io/
https://github.com/kubernetes/kubernetes
Open Source community
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node Node Node
Dev
Ops
SCM
(Git/Svn)
CI/CD
Automation
Routing Layer
Registry
SDN Overlay Network
Controllers
- Scheduler
- Replication
- Services
- Builds
- Routes
- Deployment
Kubernetes
OpenShift
- Deployments
- Builds
- ImageStreams
@rafabene developers.redhat.com
Kubernetes Concepts
Pod Replication
Controller
Service Label
One or More Containers
Shared IP
Shared Storage Volume
Shared Resources
Shared Lifecycle
Ensures that a specified
number of pod replicas are
running at any one time
Grouping of pods, act as
one, has stable virtual IP
and DNS name
Key/Value pairs associated
with Kubernetes objects
(e.g. env=production)
@rafabene and @christianposta
Concept: Pod
● Group of containers
● Live and die together
● Share:
○ IP
○ Secrets
○ Volumes
○ Labels *
* we will talk about labels later
Labels
Application
Administrative
console
Log collector
IP: 10.x.x.x
Volume
SCM
(Git/Svn)
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node Node Node
Dev
Ops
CI/CD
Automation
Routing Layer
Registry
SDN Overlay Network
Controllers
- Scheduler
- Replication
- Services
- Builds
- Routes
- Deployment
Kubernetes
OpenShift
- Deployments
- Builds
- ImageStreams
SCM
(Git/Svn)
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node Node Node
Dev
Ops
CI/CD
Automation
Routing Layer
Registry
SDN Overlay Network
Controllers
- Scheduler
- Replication
- Services
- Builds
- Routes
- Deployment
Kubernetes
OpenShift
- Deployments
- Builds
- ImageStreams
SCM
(Git/Svn)
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node Node Node
Dev
Ops
CI/CD
Automation
Routing Layer
Registry
SDN Overlay Network
Controllers
- Scheduler
- Replication
- Services
- Builds
- Routes
- Deployment
Kubernetes
OpenShift
- Deployments
- Builds
- ImageStreams
@rafabene and @christianposta
Concept: Labels
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Prod
Version: 1.0
App: Cool
Env: Dev
Version: 2.0
App: Cool
Env: Prod
Version: 2.0
Everything in Kubernetes can
have a label
Node
Logger
Node
NodeNode
@rafabene and @christianposta
Concept: Labels
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Prod
Version: 1.0
App: Cool
Env: Dev
Version: 2.0
App: Cool
Env: Prod
Version: 2.0
Logger
Node
NodeNode
Node
@rafabene and @christianposta
Concept: Labels
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Prod
Version: 1.0
App: Cool
Env: Dev
Version: 2.0
App: Cool
Env: Prod
Version: 2.0
Logger
Node
Node
Node
Node
@rafabene and @christianposta
Node 2
POD
App: Cool
Env: Prod
Version: 1.0
POD
Service
Labels selector:
● App=Cool
● Env=Prod
IP: 172.x.x.x
App: Nice
Env: Prod
Version: 1.0
Concept: Services
Node 1
POD
@rafabene and @christianposta
Using Environment variables:
Using internal DNS: $ ping mysql
Service discovery
@rafabene and @christianposta
Deployment Concept: Rolling Updates
Pod
Replication
Controller
Pod Pod Pod
App: Cool
Version: 1.0
Version: 1.0
Replicas: 4
Backend
Replication
Controller
Version: 2.0
Replicas: 1
PodPod Pod Pod
App: Cool
Version: 2.0
Version: 1.0
Replicas: 3
Version: 2.0
Replicas: 2
Version: 1.0
Replicas: 2
Version: 2.0
Replicas: 3
Version: 1.0
Replicas: 1
Version: 2.0
Replicas: 4
@rafabene and @christianposta
If you want to know more about Kubernetes, join
The "Kubernertes for Java Developers" lab
Wednesday, Sep 21, 12:30 p.m. - 2:30 p.m.
Hilton - Franciscan Room C/D
@rafabene and @christianposta
@rafabene and @christianposta
Hello World Service
- Greet
Guestbook Service
- Create
Guestbook Service -
Retrieve
@rafabene and @christianposta
Creating business value through software is
about speed, safety, iteration, and continuous
improvement
@rafabene and @christianposta
@rafabene and @christianposta
How do we deliver value fast (and safely)?
ANSWER:
Continuous delivery of containerized microservices
@rafabene and @christianposta
Challenges of microservices CI/CD
● Lots of independent teams want their own
○ flexible pipelines
○ Environments (Dev/IST/UAT/Prod)
○ Resources (compute, network, storage)
● Automation because we have lots of microservices
○ Creation of projects, CD pipelines, environments,
releases, etc.
@rafabene and @christianposta
Jenkins and Kubernetes is kinda groovy!
Jenkins Pipeline + Jenkins Kubernetes Plugin Rocks!
@rafabene and @christianposta
Fabric8 all the things!
● Built on top of Kubernetes
● Wizards to create microservices
● Package as immutable containers
● Rolling upgrade across environments
● 1-Click install of fully configured CI/CD
(Jenkins Pipeline, Nexus, Git)
● Feedback loops
● Lots of developer tooling
http://fabric8.io
@rafabene and @christianposta
Fabric8 stands on the shoulder of giants
@rafabene and @christianposta
And more giants...
@rafabene and @christianposta
And more giants...
@rafabene and @christianposta
Did I mention giants...
@rafabene and @christianposta
Getting started with Fabric8 on Kubernetes
● Kubernetes
○ Google Container Engine (GKE)
http://cloud.google.com/container-engine
○ Amazon, Azure, Digital Ocean, et.al.
https://stackpoint.io
○ On premise:
http://kubernetes.io
● OpenShift (Enterprise Kubernetes)
○ https://openshift.com
● Then deploy fabric8 with gofabric8 deploy
○ https://github.com/fabric8io/gofabric8
http://fabric8.io
@rafabene and @christianposta
Demo Time!! Please reach out with questions!
Rafael Benevides
@rafabene
benevides@redhat.com
Christian Posta
@christianposta
christian@redhat.com

More Related Content

What's hot (17)

PPTX
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
PDF
Troubleshooting tips from docker support engineers
Docker, Inc.
 
PDF
Openbar 7 - Leuven - OpenShift - The Enterprise Container Platform - Piros
Openbar
 
PPTX
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
Brian Dawson
 
PDF
Becoming a Plumber: Building Deployment Pipelines - All Day DevOps
Daniel Barker
 
PPTX
Deploy and upgrade Docker applications with a single click
Docker, Inc.
 
PDF
Continuous Delivery with Jenkins Workflow
Udaypal Aarkoti
 
PDF
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Continuous Delivery Pipeline with Docker and Jenkins
Camilo Ribeiro
 
PPTX
Javaone 2014 - Git & Docker with Jenkins
Andy Pemberton
 
PDF
Using Go in DevOps
Eficode
 
PPTX
Continuous Integration With Jenkins Docker SQL Server
Chris Adkin
 
PPTX
DevOps with OpenShift - Fabien Dupont - ManageIQ Design Summit 2016
ManageIQ
 
PDF
OPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
Natale Vinto
 
PDF
CI/CD Pipeline as a Code using Jenkins 2
Mayank Patel
 
PDF
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
Daniel Oh
 
PPTX
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
Troubleshooting tips from docker support engineers
Docker, Inc.
 
Openbar 7 - Leuven - OpenShift - The Enterprise Container Platform - Piros
Openbar
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
Brian Dawson
 
Becoming a Plumber: Building Deployment Pipelines - All Day DevOps
Daniel Barker
 
Deploy and upgrade Docker applications with a single click
Docker, Inc.
 
Continuous Delivery with Jenkins Workflow
Udaypal Aarkoti
 
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Continuous Delivery Pipeline with Docker and Jenkins
Camilo Ribeiro
 
Javaone 2014 - Git & Docker with Jenkins
Andy Pemberton
 
Using Go in DevOps
Eficode
 
Continuous Integration With Jenkins Docker SQL Server
Chris Adkin
 
DevOps with OpenShift - Fabien Dupont - ManageIQ Design Summit 2016
ManageIQ
 
OPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
Natale Vinto
 
CI/CD Pipeline as a Code using Jenkins 2
Mayank Patel
 
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
Daniel Oh
 
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 

Viewers also liked (16)

PDF
Enterprise Integration Patterns na nuvem com Spring Integration
Edson Yanaga
 
PDF
Architecting cloud-enabled applications using Spring-Integration 2.x
Edson Yanaga
 
ODP
TDC 2014 SP - E o DeltaSpike ?
Rafael Benevides
 
PDF
CDI Extensions e DeltaSpike
Rafael Benevides
 
PDF
Java Craftsmanship: Lessons Learned on How to Produce Truly Beautiful Java Code
Edson Yanaga
 
PDF
CDK 2.0: Docker, Kubernetes, And OSE On Your Desk (Langdon White)
Red Hat Developers
 
PDF
Write Powerful Javascript Modules To Make Your Apps DRY (Brian Leathem)
Red Hat Developers
 
PDF
High Performance Data Storage in a Microservices Environment
Red Hat Developers
 
PDF
Containers: Under The Hood (Vincent Batts)
Red Hat Developers
 
PDF
MicroServices for Java Developers
Red Hat Developers
 
PDF
Kubernetes for Java Developers
Red Hat Developers
 
PPTX
DevOps Moves To Production (Lori MacVittie)
Red Hat Developers
 
PDF
The Deploy Master: From Basic to Zero Downtime, Blue/Green, A/B and Canary
Red Hat Developers
 
PDF
Reactive Distributed Applications with Vert.x
Red Hat Developers
 
PDF
Microservices with Docker, Kubernetes, and Jenkins
Red Hat Developers
 
PDF
Developing In Python On Red Hat Platforms (Nick Coghlan & Graham Dumpleton)
Red Hat Developers
 
Enterprise Integration Patterns na nuvem com Spring Integration
Edson Yanaga
 
Architecting cloud-enabled applications using Spring-Integration 2.x
Edson Yanaga
 
TDC 2014 SP - E o DeltaSpike ?
Rafael Benevides
 
CDI Extensions e DeltaSpike
Rafael Benevides
 
Java Craftsmanship: Lessons Learned on How to Produce Truly Beautiful Java Code
Edson Yanaga
 
CDK 2.0: Docker, Kubernetes, And OSE On Your Desk (Langdon White)
Red Hat Developers
 
Write Powerful Javascript Modules To Make Your Apps DRY (Brian Leathem)
Red Hat Developers
 
High Performance Data Storage in a Microservices Environment
Red Hat Developers
 
Containers: Under The Hood (Vincent Batts)
Red Hat Developers
 
MicroServices for Java Developers
Red Hat Developers
 
Kubernetes for Java Developers
Red Hat Developers
 
DevOps Moves To Production (Lori MacVittie)
Red Hat Developers
 
The Deploy Master: From Basic to Zero Downtime, Blue/Green, A/B and Canary
Red Hat Developers
 
Reactive Distributed Applications with Vert.x
Red Hat Developers
 
Microservices with Docker, Kubernetes, and Jenkins
Red Hat Developers
 
Developing In Python On Red Hat Platforms (Nick Coghlan & Graham Dumpleton)
Red Hat Developers
 
Ad

Similar to Microservices with Kubernetes, Docker, and Jenkins (20)

PDF
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
tdc-globalcode
 
PDF
Kubernetes_Webinar_Slide_Deck.pdf
AuliaFebrian2
 
PPTX
Kubernetes Introduction
Red Hat Developers
 
PPTX
Gatekeeper: API gateway
ChengHui Weng
 
PPTX
Use GitLab with Chaos Engineering to Harden your Applications + OpenEBS 1.3 ...
MayaData Inc
 
PDF
給 RD 的 Kubernetes 初體驗
William Yeh
 
PDF
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 
PPTX
Interop 2018 - Understanding Kubernetes - Brian Gracely
Brian Gracely
 
PDF
Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...
DevOps.com
 
PDF
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
Marco Ferrigno
 
PDF
The DevOps Paradigm
NaLUG
 
PDF
Developing Microservices Directly in AKS/Kubernetes
Chakradhar Rao Jonagam
 
PDF
The App Developer's Kubernetes Toolbox
Nebulaworks
 
PPTX
Docker Training - June 2015
{code}
 
PDF
Docker and Containers overview - Docker Workshop
Jonas Rosland
 
PPTX
Microsoft, Linux, Open Source, DevOps
Jessica Deen
 
PPTX
Docker and containers - For Boston Docker Meetup Workshop in March 2015
Jonas Rosland
 
PDF
Lunar Way and the Cloud Native "stack"
Kasper Nissen
 
PPTX
The Future of Web Application Architectures
Lucas Carlson
 
PDF
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
Yusuf Hadiwinata Sutandar
 
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
tdc-globalcode
 
Kubernetes_Webinar_Slide_Deck.pdf
AuliaFebrian2
 
Kubernetes Introduction
Red Hat Developers
 
Gatekeeper: API gateway
ChengHui Weng
 
Use GitLab with Chaos Engineering to Harden your Applications + OpenEBS 1.3 ...
MayaData Inc
 
給 RD 的 Kubernetes 初體驗
William Yeh
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 
Interop 2018 - Understanding Kubernetes - Brian Gracely
Brian Gracely
 
Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...
DevOps.com
 
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
Marco Ferrigno
 
The DevOps Paradigm
NaLUG
 
Developing Microservices Directly in AKS/Kubernetes
Chakradhar Rao Jonagam
 
The App Developer's Kubernetes Toolbox
Nebulaworks
 
Docker Training - June 2015
{code}
 
Docker and Containers overview - Docker Workshop
Jonas Rosland
 
Microsoft, Linux, Open Source, DevOps
Jessica Deen
 
Docker and containers - For Boston Docker Meetup Workshop in March 2015
Jonas Rosland
 
Lunar Way and the Cloud Native "stack"
Kasper Nissen
 
The Future of Web Application Architectures
Lucas Carlson
 
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
Yusuf Hadiwinata Sutandar
 
Ad

More from Rafael Benevides (7)

PDF
Docker for (Java) Developers
Rafael Benevides
 
PDF
Reunião SouJava BSB - 2005 - Java a favor do consumidor brasileiro
Rafael Benevides
 
PDF
Apostilava Java EE 5 - 2007
Rafael Benevides
 
ODP
TDC 2012 - JDF
Rafael Benevides
 
PDF
JBossInBossa 2011 - BRMS
Rafael Benevides
 
PPT
JBossinBossa 2010 - Seam
Rafael Benevides
 
PDF
Red Hat Roadshow 2009 - Drools
Rafael Benevides
 
Docker for (Java) Developers
Rafael Benevides
 
Reunião SouJava BSB - 2005 - Java a favor do consumidor brasileiro
Rafael Benevides
 
Apostilava Java EE 5 - 2007
Rafael Benevides
 
TDC 2012 - JDF
Rafael Benevides
 
JBossInBossa 2011 - BRMS
Rafael Benevides
 
JBossinBossa 2010 - Seam
Rafael Benevides
 
Red Hat Roadshow 2009 - Drools
Rafael Benevides
 

Recently uploaded (20)

PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 

Microservices with Kubernetes, Docker, and Jenkins

  • 1. 1 Microservices with Docker, Kubernetes and Jenkins Rafael Benevides & Christian Posta @rafabene / @christianposta http://bit.ly/javaone-kb8s-jenkins
  • 2. Christian Posta Principal Middleware Architect at Red Hat [email protected] @christianposta ● Author “Microservices for Java Developers” ● Committer Apache Camel, ActiveMQ, ActiveMQ PMC, Fabric8.io ● Worked with large Microservices, web-scale companies ● Blogger, speaker about microservices, DevOps, cloud, distributed systems, messaging
  • 3. Rafael Benevides Director of Developer Experience at Red Hat Apache DeltaSpike P.M.C [email protected] @rafabene Java Certifications: SCJA / SCJP / SCWCD / SCBCD / SCEA JBoss Certifications: JBCD / JBCAA Red Hat Certifications: OpenShift / Containers / Ansible Other Certifications: SAP Netweaver / ITIL / IBM Software Quality
  • 5. @rafabene and @christianposta Why do you want to run your application inside containers?
  • 6. @rafabene and @christianposta ● Lightweight footprint and minimal overhead, ● Portability across machines, ● Simplify DevOps practices, ● Speeds up Continuous Integration, ● Empower Microservices Architectures. ● Isolation Container Advantages Container Engine
  • 7. @rafabene and @christianposta A way to run a Linux container: $ docker run -d <image-name> A single and isolated Linux process running in a single machine
  • 8. @rafabene and @christianposta 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? Node Node Logger Node Node Node Node
  • 9. @rafabene and @christianposta Greek for “Helmsman”; also the root of the word “Governor” (from latin: gubernator) ● 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 Meet Kubernetes
  • 10. @rafabene and @christianposta Version 1.3 Hosted on GitHub 800+ contributors 34,000+ commits 16,000+ GitHub stars Red Hat HP IBM Mesosphere Microsoft Project Partners CoreOS Pivotal SaltStack VMWare http://kubernetes.io/ https://github.com/kubernetes/kubernetes Open Source community
  • 11. Master API Server Service Layer VirtualPhysical Private Public Persistent Storage Node Node Logger Node Node Node Node Dev Ops SCM (Git/Svn) CI/CD Automation Routing Layer Registry SDN Overlay Network Controllers - Scheduler - Replication - Services - Builds - Routes - Deployment Kubernetes OpenShift - Deployments - Builds - ImageStreams
  • 12. @rafabene developers.redhat.com Kubernetes Concepts Pod Replication Controller Service Label One or More Containers Shared IP Shared Storage Volume Shared Resources Shared Lifecycle Ensures that a specified number of pod replicas are running at any one time Grouping of pods, act as one, has stable virtual IP and DNS name Key/Value pairs associated with Kubernetes objects (e.g. env=production)
  • 13. @rafabene and @christianposta Concept: Pod ● Group of containers ● Live and die together ● Share: ○ IP ○ Secrets ○ Volumes ○ Labels * * we will talk about labels later Labels Application Administrative console Log collector IP: 10.x.x.x Volume
  • 14. SCM (Git/Svn) Master API Server Service Layer VirtualPhysical Private Public Persistent Storage Node Node Logger Node Node Node Node Dev Ops CI/CD Automation Routing Layer Registry SDN Overlay Network Controllers - Scheduler - Replication - Services - Builds - Routes - Deployment Kubernetes OpenShift - Deployments - Builds - ImageStreams
  • 15. SCM (Git/Svn) Master API Server Service Layer VirtualPhysical Private Public Persistent Storage Node Node Logger Node Node Node Node Dev Ops CI/CD Automation Routing Layer Registry SDN Overlay Network Controllers - Scheduler - Replication - Services - Builds - Routes - Deployment Kubernetes OpenShift - Deployments - Builds - ImageStreams
  • 16. SCM (Git/Svn) Master API Server Service Layer VirtualPhysical Private Public Persistent Storage Node Node Logger Node Node Node Node Dev Ops CI/CD Automation Routing Layer Registry SDN Overlay Network Controllers - Scheduler - Replication - Services - Builds - Routes - Deployment Kubernetes OpenShift - Deployments - Builds - ImageStreams
  • 17. @rafabene and @christianposta Concept: Labels App: Cool Env: Dev Version: 1.0 App: Cool Env: Prod Version: 1.0 App: Cool Env: Dev Version: 2.0 App: Cool Env: Prod Version: 2.0 Everything in Kubernetes can have a label Node Logger Node NodeNode
  • 18. @rafabene and @christianposta Concept: Labels App: Cool Env: Dev Version: 1.0 App: Cool Env: Prod Version: 1.0 App: Cool Env: Dev Version: 2.0 App: Cool Env: Prod Version: 2.0 Logger Node NodeNode Node
  • 19. @rafabene and @christianposta Concept: Labels App: Cool Env: Dev Version: 1.0 App: Cool Env: Prod Version: 1.0 App: Cool Env: Dev Version: 2.0 App: Cool Env: Prod Version: 2.0 Logger Node Node Node Node
  • 20. @rafabene and @christianposta Node 2 POD App: Cool Env: Prod Version: 1.0 POD Service Labels selector: ● App=Cool ● Env=Prod IP: 172.x.x.x App: Nice Env: Prod Version: 1.0 Concept: Services Node 1 POD
  • 21. @rafabene and @christianposta Using Environment variables: Using internal DNS: $ ping mysql Service discovery
  • 22. @rafabene and @christianposta Deployment Concept: Rolling Updates Pod Replication Controller Pod Pod Pod App: Cool Version: 1.0 Version: 1.0 Replicas: 4 Backend Replication Controller Version: 2.0 Replicas: 1 PodPod Pod Pod App: Cool Version: 2.0 Version: 1.0 Replicas: 3 Version: 2.0 Replicas: 2 Version: 1.0 Replicas: 2 Version: 2.0 Replicas: 3 Version: 1.0 Replicas: 1 Version: 2.0 Replicas: 4
  • 23. @rafabene and @christianposta If you want to know more about Kubernetes, join The "Kubernertes for Java Developers" lab Wednesday, Sep 21, 12:30 p.m. - 2:30 p.m. Hilton - Franciscan Room C/D
  • 25. @rafabene and @christianposta Hello World Service - Greet Guestbook Service - Create Guestbook Service - Retrieve
  • 26. @rafabene and @christianposta Creating business value through software is about speed, safety, iteration, and continuous improvement
  • 28. @rafabene and @christianposta How do we deliver value fast (and safely)? ANSWER: Continuous delivery of containerized microservices
  • 29. @rafabene and @christianposta Challenges of microservices CI/CD ● Lots of independent teams want their own ○ flexible pipelines ○ Environments (Dev/IST/UAT/Prod) ○ Resources (compute, network, storage) ● Automation because we have lots of microservices ○ Creation of projects, CD pipelines, environments, releases, etc.
  • 30. @rafabene and @christianposta Jenkins and Kubernetes is kinda groovy! Jenkins Pipeline + Jenkins Kubernetes Plugin Rocks!
  • 31. @rafabene and @christianposta Fabric8 all the things! ● Built on top of Kubernetes ● Wizards to create microservices ● Package as immutable containers ● Rolling upgrade across environments ● 1-Click install of fully configured CI/CD (Jenkins Pipeline, Nexus, Git) ● Feedback loops ● Lots of developer tooling http://fabric8.io
  • 32. @rafabene and @christianposta Fabric8 stands on the shoulder of giants
  • 35. @rafabene and @christianposta Did I mention giants...
  • 36. @rafabene and @christianposta Getting started with Fabric8 on Kubernetes ● Kubernetes ○ Google Container Engine (GKE) http://cloud.google.com/container-engine ○ Amazon, Azure, Digital Ocean, et.al. https://stackpoint.io ○ On premise: http://kubernetes.io ● OpenShift (Enterprise Kubernetes) ○ https://openshift.com ● Then deploy fabric8 with gofabric8 deploy ○ https://github.com/fabric8io/gofabric8 http://fabric8.io
  • 37. @rafabene and @christianposta Demo Time!! Please reach out with questions! Rafael Benevides @rafabene [email protected] Christian Posta @christianposta [email protected]