SlideShare a Scribd company logo
1 of 24
Continuous Delivery to
Kubernetes using
Helm
Adnan Abdulhussein - @prydonius
Agenda
•CI/CD on Kubernetes
•Helm recap
•Demo
CI/CD
•Run Unit/Functional Tests
… also for PRs
•Automatically Build and Push Images
•Rollout New Version
Code/config change
Build
Test
Push Docker image
Staging/QA deployment
Production deployment
Manual verification
Code/config change
Build
Test
Push Docker image
Staging/QA deployment
Production deployment
Manual verification
Kubernetes Resource Definitions
MongoDB
Service
resource
Database tier
Secret
resource
Deployment
resource
Application
Service
resource
Backend tier
Config Map
resource
Deployment
resource
Nginx
Service
resource
Frontend tier
Deployment
resource
Example: Kubernetes resource
apiVersion: v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 1
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-app
image: prydonius/node-todo:v1.0.0
ports:
- containerPort: 80
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 120
timeoutSeconds: 5
kubectl apply -f manifests/
sed -i.bak 's#prydonius/node-
todo:v1.0.0#${imageTag}#' deployment.yaml
Tool for managing
resources as a
single unit
● Reuse resources
● Logically group app resources
● Manage app lifecycles
Charts
(packages)
Application definitions
Consist of
Metadata (Chart.yaml)
Documentation
Kubernetes templates
Configuration file (values.yaml)
Can depend on other charts
helm install my-app --set image.tag=${imageTag}
Demo!
Pipeline Stages: Build
environment {
IMAGE_NAME = 'prydonius/node-todo'
}
stage('Build') {
agent any
steps {
checkout scm
sh 'docker build -t $IMAGE_NAME:$BUILD_ID .'
}
}
Pipeline Stages: Push
stage('Image Release') {
agent any
when {
expression { env.BRANCH_NAME == 'master' }
}
steps {
withCredentials([[$class: 'UsernamePasswordMultiBinding',
credentialsId: 'dockerhub',
usernameVariable: 'DOCKER_USERNAME', passwordVariable:
'DOCKER_PASSWORD']]) {
sh '''
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker push $IMAGE_NAME:$BUILD_ID
'''
}
}
}
Only release master builds
Pipeline Stages: Staging Deployment
stage('Staging Deployment') {
...
environment {
RELEASE_NAME = 'todos-staging'
SERVER_HOST = 'todos.staging.k8s.prydoni.us'
}
steps {
sh '''
. ./helm/helm-init.sh
helm dependencies build ./helm/todo
helm upgrade --install --namespace staging $RELEASE_NAME ./helm/todo 
--set image.tag=$BUILD_ID,ingress.host=$SERVER_HOST
'''
}
}
Pipeline Stages: Manual Verification
stage('Deploy to Production?') {
when {
expression { env.BRANCH_NAME == 'master' }
}
steps {
// Prevent any older builds from deploying to production
milestone(1)
input 'Deploy to Production?'
milestone(2)
}
}
Pipeline Stages: Production Deployment
stage('Production Deployment') {
...
environment {
RELEASE_NAME = 'todos-production'
SERVER_HOST = 'todos.k8s.prydoni.us'
}
steps {
sh '''
. ./helm/helm-init.sh
helm dependencies build ./helm/todo
helm upgrade --install --namespace production $RELEASE_NAME ./helm/todo 
--set image.tag=$BUILD_ID,ingress.host=$SERVER_HOST
'''
}
}
Helm Community
• Over 140 contributors
• Helm 2.4.1 released last week!
• Slack channel: Kubernetes #helm-users
• Public dev meetings: Thursdays @ 9:30 pacific (5:30pm BST)
• Weekly updates & demos at SIG-Apps meetings:
Mondays @ 9am pacific (5pm BST)
Join
us!
Thank You

More Related Content

What's hot

What's hot (20)

Deploy your favorite apps on Kubernetes
Deploy your favorite apps on KubernetesDeploy your favorite apps on Kubernetes
Deploy your favorite apps on Kubernetes
 
Introduction to helm
Introduction to helmIntroduction to helm
Introduction to helm
 
Deploying containerized applications with Kubeapps
Deploying containerized applications with KubeappsDeploying containerized applications with Kubeapps
Deploying containerized applications with Kubeapps
 
Intro to Helm for Kubernetes
Intro to Helm for KubernetesIntro to Helm for Kubernetes
Intro to Helm for Kubernetes
 
Multi-cloud Kubernetes BCDR with Velero
Multi-cloud Kubernetes BCDR with VeleroMulti-cloud Kubernetes BCDR with Velero
Multi-cloud Kubernetes BCDR with Velero
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBuilding Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
 
Building CI/CD Pipelines with Jenkins and Kubernetes
Building CI/CD Pipelines with Jenkins and KubernetesBuilding CI/CD Pipelines with Jenkins and Kubernetes
Building CI/CD Pipelines with Jenkins and Kubernetes
 
KubeCon EU 2016 Keynote: Kubernetes State of the Union
KubeCon EU 2016 Keynote: Kubernetes State of the UnionKubeCon EU 2016 Keynote: Kubernetes State of the Union
KubeCon EU 2016 Keynote: Kubernetes State of the Union
 
Getting started with Azure Container Service (AKS)
Getting started with Azure Container Service (AKS)Getting started with Azure Container Service (AKS)
Getting started with Azure Container Service (AKS)
 
Kubernetes @ Nanit by Chen Fisher
Kubernetes @ Nanit by Chen FisherKubernetes @ Nanit by Chen Fisher
Kubernetes @ Nanit by Chen Fisher
 
Lean Cloud Starterkit - Beta
Lean Cloud Starterkit - BetaLean Cloud Starterkit - Beta
Lean Cloud Starterkit - Beta
 
Helm - Application deployment management for Kubernetes
Helm - Application deployment management for KubernetesHelm - Application deployment management for Kubernetes
Helm - Application deployment management for Kubernetes
 
Why kubernetes matters
Why kubernetes mattersWhy kubernetes matters
Why kubernetes matters
 
On Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons LearnedOn Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons Learned
 
GlueCon kubernetes & container engine
GlueCon kubernetes & container engineGlueCon kubernetes & container engine
GlueCon kubernetes & container engine
 
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
 
Docker?!?! But I'm a SysAdmin
Docker?!?! But I'm a SysAdminDocker?!?! But I'm a SysAdmin
Docker?!?! But I'm a SysAdmin
 
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLINGKUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
 
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud ServicesGIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
 

Similar to Continuous Delivery to Kubernetes Using Helm

Developing Serverless Applications on Kubernetes with Knative
Developing Serverless Applications on Kubernetes with KnativeDeveloping Serverless Applications on Kubernetes with Knative
Developing Serverless Applications on Kubernetes with Knative
VMware Tanzu
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 

Similar to Continuous Delivery to Kubernetes Using Helm (20)

Kubernetes CI/CD with Helm
Kubernetes CI/CD with HelmKubernetes CI/CD with Helm
Kubernetes CI/CD with Helm
 
Developing Serverless Applications on Kubernetes with Knative
Developing Serverless Applications on Kubernetes with KnativeDeveloping Serverless Applications on Kubernetes with Knative
Developing Serverless Applications on Kubernetes with Knative
 
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
 
Cloud Foundry Summit Europe 2018 - Deveveloper Experience with Cloud Foundry ...
Cloud Foundry Summit Europe 2018 - Deveveloper Experience with Cloud Foundry ...Cloud Foundry Summit Europe 2018 - Deveveloper Experience with Cloud Foundry ...
Cloud Foundry Summit Europe 2018 - Deveveloper Experience with Cloud Foundry ...
 
Kube journey 2017-04-19
Kube journey   2017-04-19Kube journey   2017-04-19
Kube journey 2017-04-19
 
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB201904_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
 
A tale of two pizzas: Developer tools at AWS
A tale of two pizzas: Developer tools at AWSA tale of two pizzas: Developer tools at AWS
A tale of two pizzas: Developer tools at AWS
 
Kubernetes VS. App Service: When the orchestrator challenges the platform
Kubernetes VS. App Service: When the orchestrator challenges the platformKubernetes VS. App Service: When the orchestrator challenges the platform
Kubernetes VS. App Service: When the orchestrator challenges the platform
 
Security considerations while deploying Containerized Applications by Neepend...
Security considerations while deploying Containerized Applications by Neepend...Security considerations while deploying Containerized Applications by Neepend...
Security considerations while deploying Containerized Applications by Neepend...
 
Knative build for open whisk runtimes phase 1 - 2018-02-20
Knative build for open whisk runtimes   phase 1 - 2018-02-20Knative build for open whisk runtimes   phase 1 - 2018-02-20
Knative build for open whisk runtimes phase 1 - 2018-02-20
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the Cloud
 
Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burnt
 
The App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxThe App Developer's Kubernetes Toolbox
The App Developer's Kubernetes Toolbox
 
Microservices with gRPC and Kubernetes
Microservices with gRPC and KubernetesMicroservices with gRPC and Kubernetes
Microservices with gRPC and Kubernetes
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
 
The Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud NativeThe Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud Native
 
VMware Tanzu Introduction- June 11, 2020
VMware Tanzu Introduction- June 11, 2020VMware Tanzu Introduction- June 11, 2020
VMware Tanzu Introduction- June 11, 2020
 
Accelerate Application Innovation Journey with Azure Kubernetes Service
Accelerate Application Innovation Journey with Azure Kubernetes Service Accelerate Application Innovation Journey with Azure Kubernetes Service
Accelerate Application Innovation Journey with Azure Kubernetes Service
 
Containerizing your Security Operations Center
Containerizing your Security Operations CenterContainerizing your Security Operations Center
Containerizing your Security Operations Center
 

Recently uploaded

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

Continuous Delivery to Kubernetes Using Helm

  • 1.
  • 2. Continuous Delivery to Kubernetes using Helm Adnan Abdulhussein - @prydonius
  • 4.
  • 5. CI/CD •Run Unit/Functional Tests … also for PRs •Automatically Build and Push Images •Rollout New Version
  • 6. Code/config change Build Test Push Docker image Staging/QA deployment Production deployment Manual verification
  • 7. Code/config change Build Test Push Docker image Staging/QA deployment Production deployment Manual verification
  • 8.
  • 9. Kubernetes Resource Definitions MongoDB Service resource Database tier Secret resource Deployment resource Application Service resource Backend tier Config Map resource Deployment resource Nginx Service resource Frontend tier Deployment resource
  • 10. Example: Kubernetes resource apiVersion: v1 kind: Deployment metadata: name: my-app spec: replicas: 1 template: metadata: labels: app: my-app spec: containers: - name: my-app image: prydonius/node-todo:v1.0.0 ports: - containerPort: 80 livenessProbe: httpGet: path: / port: http initialDelaySeconds: 120 timeoutSeconds: 5
  • 11. kubectl apply -f manifests/
  • 13. Tool for managing resources as a single unit ● Reuse resources ● Logically group app resources ● Manage app lifecycles
  • 14. Charts (packages) Application definitions Consist of Metadata (Chart.yaml) Documentation Kubernetes templates Configuration file (values.yaml) Can depend on other charts
  • 15. helm install my-app --set image.tag=${imageTag}
  • 16.
  • 17. Demo!
  • 18. Pipeline Stages: Build environment { IMAGE_NAME = 'prydonius/node-todo' } stage('Build') { agent any steps { checkout scm sh 'docker build -t $IMAGE_NAME:$BUILD_ID .' } }
  • 19. Pipeline Stages: Push stage('Image Release') { agent any when { expression { env.BRANCH_NAME == 'master' } } steps { withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'dockerhub', usernameVariable: 'DOCKER_USERNAME', passwordVariable: 'DOCKER_PASSWORD']]) { sh ''' docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD docker push $IMAGE_NAME:$BUILD_ID ''' } } } Only release master builds
  • 20. Pipeline Stages: Staging Deployment stage('Staging Deployment') { ... environment { RELEASE_NAME = 'todos-staging' SERVER_HOST = 'todos.staging.k8s.prydoni.us' } steps { sh ''' . ./helm/helm-init.sh helm dependencies build ./helm/todo helm upgrade --install --namespace staging $RELEASE_NAME ./helm/todo --set image.tag=$BUILD_ID,ingress.host=$SERVER_HOST ''' } }
  • 21. Pipeline Stages: Manual Verification stage('Deploy to Production?') { when { expression { env.BRANCH_NAME == 'master' } } steps { // Prevent any older builds from deploying to production milestone(1) input 'Deploy to Production?' milestone(2) } }
  • 22. Pipeline Stages: Production Deployment stage('Production Deployment') { ... environment { RELEASE_NAME = 'todos-production' SERVER_HOST = 'todos.k8s.prydoni.us' } steps { sh ''' . ./helm/helm-init.sh helm dependencies build ./helm/todo helm upgrade --install --namespace production $RELEASE_NAME ./helm/todo --set image.tag=$BUILD_ID,ingress.host=$SERVER_HOST ''' } }
  • 23. Helm Community • Over 140 contributors • Helm 2.4.1 released last week! • Slack channel: Kubernetes #helm-users • Public dev meetings: Thursdays @ 9:30 pacific (5:30pm BST) • Weekly updates & demos at SIG-Apps meetings: Mondays @ 9am pacific (5pm BST) Join us!