SlideShare a Scribd company logo
Scaling Jenkins with Kubernetes 1.2
About me
Senior DevOps Engineer @ Glide
rubygems.org/profiles/amimahloof
Contribution to OpenSource via RubyGems and GitHub:
github.com/innovia
linkedin.com/in/amimahloof
Glide environment
Multiple Redis Servers
MySQL
DynamoDB
Multiple Background Queue Processors
App Server
Multiple Web Socket Servers
CloudSearch
Previous Jenkins setup
Single Jenkins Master machine for Server code
builds
Single Jenkins Master Machine for Android
client builds
Dedicated MySQL database per build
Dedicated port per build service
Each build environment encapsulated and
managed by Eye - process monitoring
https://github.com/kostya/eye
Previous Jenkins Issues
Under-utilized instances running 24/7 (expensive!)
Port collisions
Out of memory issues - build failures
Databases needed to be created and wiped per build
Debugging failed tests was extremely hard
Updating Jenkins ec2 image especially for Android was a
challenge
NFS-SERVER
POD EBS Volume
Scaling Jenkins with Kubernetes
Jenkins Master
BackEnd RC
Jenkins Master
Android RC
Backend
POD
Jenkins Ingress
Controller
POD
nginx configmap
Jenkins
Slave
POD
With KubeCtl
Backend Service (IP)
single elb
for both CI’s
addresses
Current Jenkins Kubernetes Plugin
https://github.com/jenkinsci/kubernetes-plugin
Support single docker image
(jenkins-slave docker image - it create’s a POD with that
image)
Does not support multiple containers in a POD
Does not support Persistent Volumes
Modified Jenkins Kubernetes Plugin
https://github.com/innovia/kubernetes-plugin
Support reading and parsing a POD template file
Support multiple containers in a POD
Support Persistant Volumes, EBS, EmptyDir, HostPath Volum
Does not support POD template per JOB
(System global config)
Read POD
Template
Start Build
Send POD
Object
Jenkins
Slave
POD
download JNLP file from
Jenkins Master
Connect to
Jenkins Master Slave Port
Build Flow Part 1
Pull Request
Build Flow Part 2
Jenkins Master Jenkins Slave
Start Job on Slave
git fetch and merge server code
create service
JOB_NAME-BUILD_NUMBER
create PV - PVC
JOB_NAME-BUILD_NUMBER
start tests
teardown
POD, SERVICE, PV, PVC
clean-up temp location
submit result to bitbucket
create POD
JOB_NAME-BUILD_NUMBER
wait for setup complete file
(check dependancies)
Advantages
On Demand PODs
Complete test isolation
Source controlled by developers flexible POD template
Jobs queued up in Kubernetes Scheduler until
node resources are available (running builds finish)
Scalable Kubernetes Nodes
Plugin keeps track of POD - if POD dies in the middle
it launches up a new slave for that job
Persistant Storage (EBS via NFS)
Spot instances using node selectors
Kubernetes on Spot Instances
Save 70-90% over On Demand
Managed by Spot Fleet to reduce downtime
Different fleets for different types of Kubernetes Nodes, allowing dynamic
pod allocation using Node Selector
Until implemented in Kubernetes 1.3, we have to create our own Fleets
eg.
https://github.com/kubernetes/kubernetes/issues/24472#issuecommen
t-211975112
Thank you!
Questions?
Slides available
http://www.slideshare.net/AmiMahloof/scaling-jenkins-with-kubernetes

More Related Content

Viewers also liked (15)

PPTX
Scaling Jenkins with Kubernetes by Ami Mahloof
DoiT International
 
PPTX
AWS and GKE Migration and Multicloud
Chris Gaun
 
PDF
Continuous Deployment with Jenkins on Kubernetes
Matt Baldwin
 
PPTX
Next-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
JavaDayUA
 
PDF
Scaling Docker with Kubernetes
Carlos Sanchez
 
PDF
Kubernetes Boston — Custom High Availability of Kubernetes
Mike Splain
 
PDF
DevOps in AWS with Kubernetes
Oleg Chunikhin
 
PDF
Seminar continuous delivery 19092013
Joris De Winne
 
PPTX
Kubernetes CI/CD with Helm
Adnan Abdulhussein
 
PPTX
Deploy your favorite apps on Kubernetes
Adnan Abdulhussein
 
PPTX
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Docker, Inc.
 
PDF
Kubernetes on aws
Yousun Jeong
 
PPTX
Monitoring, Logging and Tracing on Kubernetes
Martin Etmajer
 
PPTX
Scaling Jenkins with Docker and Kubernetes
Carlos Sanchez
 
PPTX
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Andrew Bayer
 
Scaling Jenkins with Kubernetes by Ami Mahloof
DoiT International
 
AWS and GKE Migration and Multicloud
Chris Gaun
 
Continuous Deployment with Jenkins on Kubernetes
Matt Baldwin
 
Next-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
JavaDayUA
 
Scaling Docker with Kubernetes
Carlos Sanchez
 
Kubernetes Boston — Custom High Availability of Kubernetes
Mike Splain
 
DevOps in AWS with Kubernetes
Oleg Chunikhin
 
Seminar continuous delivery 19092013
Joris De Winne
 
Kubernetes CI/CD with Helm
Adnan Abdulhussein
 
Deploy your favorite apps on Kubernetes
Adnan Abdulhussein
 
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Docker, Inc.
 
Kubernetes on aws
Yousun Jeong
 
Monitoring, Logging and Tracing on Kubernetes
Martin Etmajer
 
Scaling Jenkins with Docker and Kubernetes
Carlos Sanchez
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Andrew Bayer
 

Similar to Scaling jenkins with kubernetes (20)

PDF
Scaling Jenkins Devops presentation
prajdesh26
 
PDF
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
Carlos Sanchez
 
KEY
Building Cloud Tools for Netflix with Jenkins
Gareth Bowles
 
PDF
Using Kubernetes for Continuous Integration and Continuous Delivery
Carlos Sanchez
 
PDF
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Carlos Sanchez
 
PDF
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
Carlos Sanchez
 
PDF
Using Containers for Building and Testing: Docker, Kubernetes and Mesos. FOSD...
Carlos Sanchez
 
PDF
Kubernetes and Hybrid Deployments
Sandeep Parikh
 
PDF
Microservices with Kubernetes, Docker, and Jenkins
Rafael Benevides
 
PDF
Microservices with Docker, Kubernetes, and Jenkins
Red Hat Developers
 
PDF
Javaone kubernetesjenkins
Pravat Bhusan Parida
 
PPT
Building Clustered Applications with Kubernetes and Docker
Steve Watt
 
PDF
Java one kubernetes, jenkins and microservices
Christian Posta
 
PDF
Jenkins_Online_Meetup-Jenkins_Kubernetes_Operator.pdf
Albert Wang
 
PDF
Journey of Kubernetes Scaling
Opsta
 
PDF
Using containers for continuous integration and continuous delivery - Carlos ...
Paris Container Day
 
PDF
Using Containers for Continuous Integration and Continuous Delivery
Carlos Sanchez
 
PDF
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Carlos Sanchez
 
PDF
Running Production-Grade Kubernetes on AWS
DoiT International
 
PDF
Testing Distributed Micro Services. Agile Testing Days 2017
Carlos Sanchez
 
Scaling Jenkins Devops presentation
prajdesh26
 
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
Carlos Sanchez
 
Building Cloud Tools for Netflix with Jenkins
Gareth Bowles
 
Using Kubernetes for Continuous Integration and Continuous Delivery
Carlos Sanchez
 
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Carlos Sanchez
 
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
Carlos Sanchez
 
Using Containers for Building and Testing: Docker, Kubernetes and Mesos. FOSD...
Carlos Sanchez
 
Kubernetes and Hybrid Deployments
Sandeep Parikh
 
Microservices with Kubernetes, Docker, and Jenkins
Rafael Benevides
 
Microservices with Docker, Kubernetes, and Jenkins
Red Hat Developers
 
Javaone kubernetesjenkins
Pravat Bhusan Parida
 
Building Clustered Applications with Kubernetes and Docker
Steve Watt
 
Java one kubernetes, jenkins and microservices
Christian Posta
 
Jenkins_Online_Meetup-Jenkins_Kubernetes_Operator.pdf
Albert Wang
 
Journey of Kubernetes Scaling
Opsta
 
Using containers for continuous integration and continuous delivery - Carlos ...
Paris Container Day
 
Using Containers for Continuous Integration and Continuous Delivery
Carlos Sanchez
 
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Carlos Sanchez
 
Running Production-Grade Kubernetes on AWS
DoiT International
 
Testing Distributed Micro Services. Agile Testing Days 2017
Carlos Sanchez
 
Ad

Recently uploaded (20)

PDF
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
PDF
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PPTX
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
PPTX
Server Side Web Development Unit 1 of Nodejs.pptx
sneha852132
 
PPTX
Depth First Search Algorithm in đź§  DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PDF
Water Industry Process Automation & Control Monthly July 2025
Water Industry Process Automation & Control
 
PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
PPTX
Element 7. CHEMICAL AND BIOLOGICAL AGENT.pptx
merrandomohandas
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
PDF
Electrical Engineer operation Supervisor
ssaruntatapower143
 
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
MRRS Strength and Durability of Concrete
CivilMythili
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
Server Side Web Development Unit 1 of Nodejs.pptx
sneha852132
 
Depth First Search Algorithm in đź§  DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
Design Thinking basics for Engineers.pdf
CMR University
 
Water Industry Process Automation & Control Monthly July 2025
Water Industry Process Automation & Control
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
Element 7. CHEMICAL AND BIOLOGICAL AGENT.pptx
merrandomohandas
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
Hashing Introduction , hash functions and techniques
sailajam21
 
Electrical Engineer operation Supervisor
ssaruntatapower143
 
Ad

Scaling jenkins with kubernetes

  • 1. Scaling Jenkins with Kubernetes 1.2
  • 2. About me Senior DevOps Engineer @ Glide rubygems.org/profiles/amimahloof Contribution to OpenSource via RubyGems and GitHub: github.com/innovia linkedin.com/in/amimahloof
  • 3. Glide environment Multiple Redis Servers MySQL DynamoDB Multiple Background Queue Processors App Server Multiple Web Socket Servers CloudSearch
  • 4. Previous Jenkins setup Single Jenkins Master machine for Server code builds Single Jenkins Master Machine for Android client builds Dedicated MySQL database per build Dedicated port per build service Each build environment encapsulated and managed by Eye - process monitoring https://github.com/kostya/eye
  • 5. Previous Jenkins Issues Under-utilized instances running 24/7 (expensive!) Port collisions Out of memory issues - build failures Databases needed to be created and wiped per build Debugging failed tests was extremely hard Updating Jenkins ec2 image especially for Android was a challenge
  • 6. NFS-SERVER POD EBS Volume Scaling Jenkins with Kubernetes Jenkins Master BackEnd RC Jenkins Master Android RC Backend POD Jenkins Ingress Controller POD nginx configmap Jenkins Slave POD With KubeCtl Backend Service (IP) single elb for both CI’s addresses
  • 7. Current Jenkins Kubernetes Plugin https://github.com/jenkinsci/kubernetes-plugin Support single docker image (jenkins-slave docker image - it create’s a POD with that image) Does not support multiple containers in a POD Does not support Persistent Volumes
  • 8. Modified Jenkins Kubernetes Plugin https://github.com/innovia/kubernetes-plugin Support reading and parsing a POD template file Support multiple containers in a POD Support Persistant Volumes, EBS, EmptyDir, HostPath Volum Does not support POD template per JOB (System global config)
  • 9. Read POD Template Start Build Send POD Object Jenkins Slave POD download JNLP file from Jenkins Master Connect to Jenkins Master Slave Port Build Flow Part 1 Pull Request
  • 10. Build Flow Part 2 Jenkins Master Jenkins Slave Start Job on Slave git fetch and merge server code create service JOB_NAME-BUILD_NUMBER create PV - PVC JOB_NAME-BUILD_NUMBER start tests teardown POD, SERVICE, PV, PVC clean-up temp location submit result to bitbucket create POD JOB_NAME-BUILD_NUMBER wait for setup complete file (check dependancies)
  • 11. Advantages On Demand PODs Complete test isolation Source controlled by developers flexible POD template Jobs queued up in Kubernetes Scheduler until node resources are available (running builds finish) Scalable Kubernetes Nodes Plugin keeps track of POD - if POD dies in the middle it launches up a new slave for that job Persistant Storage (EBS via NFS) Spot instances using node selectors
  • 12. Kubernetes on Spot Instances Save 70-90% over On Demand Managed by Spot Fleet to reduce downtime Different fleets for different types of Kubernetes Nodes, allowing dynamic pod allocation using Node Selector Until implemented in Kubernetes 1.3, we have to create our own Fleets eg. https://github.com/kubernetes/kubernetes/issues/24472#issuecommen t-211975112