SlideShare a Scribd company logo
5
Most read
14
Most read
15
Most read
Krishna Kumar, CNCF Ambassador
@krish_00
September 2019, Infosys Campus Bangalore
Application Deployment in Kubernetes with
Outline

K8s App Deployment Methods!

Helm & Charts ....

Demo – helm in GKE*
What’s in Kubernetes ?

Kubernetes: Container Orchestration Engine –
abstracts underlying resources to deploy workloads

Micro Services: A fully functional software feature
independently accessed as a service

Docker: Package applications in containers

CNCF: Cloud Native Computing Foundation:
https://cncf.io
Kubenetes – helmsman(pilot);
K8s Application Deployment File
kubectl apply -f deployment.yaml
<deployment.yaml>
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
nginx – application for load balancer
3 pods will be created; one for each replica
map of {key,value} pairs
indicates that the Pods run one container
nginx Docker Hub image at version 1.7.9
Application Service port: 80
Application Deployment methods
blue/green: New version alongside old version then switching at one point; Rollout/Rollback
canary: Release a new version to few users and then decide full rollout based on result
a/b testing: Feature testing based on statistics; dark deployment that users are unaware of update
rolling: Update new version one after another slowly with no downtime
recreate: Create a new one and kill the old one; best for development environments
shadow: Both versions are running parallel with not impacting other; mocking services
& dependecies like ......
types: Stateless, Statefull, Affinity/Antiaffinity, Declarative/Imperative
clusters: Multi Cluster, Hybrid Cloud, Multi Cloud
mechanics: Manual, Batch, Package Manager, CI/CD
DevOps Pipeline
DevOps helps:
infrastructure as code
continuous integration
continuous deployment
automated release
And do:
•
Setup in k8s Clusters – Jenkin, Dev & Prod
•
Production environment with Loadbalancer
•
Create two namesapces - production & canary
•
Create jenkin job, build & push to Registry
●
Deploy Canary release (dev, prod, etc.)
●
And production release
●
And more....
https://cloud.google.com/solutions/continuous-delivery-jenkins-kubernetes-engine
K8s Application Deployment/Automation Tools...
Kubectl – Create, manage and deploy k8s artifacts - https://kubernetes.io/docs/reference/kubectl/
Kustomize - A template-free way to customize application configuration - https://kustomize.io/
CNAB - Cloud Native Application Bundling - https://cnab.io/
Skaffold - building, pushing and deploying your application - https://skaffold.dev/
Spinnakar – Multi cloud continous delivery - https://www.spinnaker.io/
Kudo - Universal declarative Operator - https://kudo.dev
Kompose – Move docker file to k8s objects - http://kompose.io/
Draft – Streamlined k8s Deployment - https://draft.sh/
Brigade – Event driven scripting for k8s - https://brigade.sh/
Kashti – Visualization Dashboard for Brigade - https://github.com/brigadecore/kashti
Jenkin - k8s plugin & Jenkin X - https://github.com/jenkinsci/kubernetes-plugin
Github - Marketplace for tools - https://github.com/marketplace/category/continuous-integration
Helm – The package manager for k8s - https://helm.sh/
What is Helm?
Helm is a package manager, helps you manage Kubernetes
applications — define, install, and upgrade even the most
complex Kubernetes application.
Helm is like apt or yum in linux world
Why do we need a package manager
●
Application focused Better control
●
Container version handling - upgrade/rollback
●
Manage dependencies
●
Reproducible and shareable
Helm initially started with Deis (now with Microsoft) & then
Google Deployment Manger team joined to create helm2.
Helm is now in CNCF Incubation project - https://helm.sh/
Helm - wheel
Charts
Chart - Charts are curated application definitions for Helm.
A chart is organized as a collection of files inside of a directory - that is package.
Charts are placed in repository similar to Docker Registry, Quay, etc.
●
Helm’s own Chart Museum - https://chartmuseum.com/
●
CNCF Project Harbor - https://goharbor.io/
●
Gihub charts - https://github.com/helm/charts
●
Helm Hub: Charts hosted in many distributed repositories - https://hub.helm.sh/
Helm manages charts, versions and releases
Instance of application - Helm Release
Sample Chart
/<projectName> - Name of the chart
●
chart.yaml – Information about chart
●
values.yaml – default configuration values
●
LICENSE – license for the chart
●
README.md – human readable text
●
requirements.yaml – dependencies for the chart
●
requirements.lock – lock the same version in requiremnts
●
/charts/ - dependencies chart upon which this chart depends
●
/templates/ - files in go template language
https://github.com/helm/charts
helm install stable/nginx-ingress --> will install nginx in k8s cluster
Helm Releases v2 (v2.14.3)
Released in 2016 (Currently production/maintenance)
A server in-cluster component was called Tiller, and it handled installing and managing Helm charts.
In Helm 2, install created v1, a subsequent upgrade created v2, and so on. In Tiller name space you can
store only one instanace name
Later Kubernetes introduced RBAC & CRDs.
With RBAC, locking down Tiller in production becomes difficult; so start providing permissive default
configuration that creted nightmare for DevOps & SREs.
So had to move Tiller, instead could simply fetch information from the Kubernetes API server, render the
Charts client-side, and store a record of the installation in Kubernetes. With no Tiller, Helm’s permissions are
evaluated using your kubeconfig file
Helm Releases v3 (v3.0.0-beta.3)
The server side component Tiller removed
Avoid Security risks
Avoid installation complications
Installation directly runs on the client
No Service account; use existing client accoutns
Namespaces are more important and release is tagged to that.
One can install multiple instances name each for each namespace with same name.
Releases are stored as secrets in the namespace
All of the Helm 2 flags still lworks
Lua templates are going to be introduced alongside Go templates (some points in future).
Introduced Library charts - simply define templates for your other Helm charts to use. Store common
information about your applications, without needing to replicate it across multiple Helm charts. Library
chart declare in Chart.yaml as dependencies.
Helm Releases v3 .. more.....
As part of the Design Proposal (some are alredy in helm3)
●
Tiller is gone, and there is only one functional component (helm)
●
Charts are updated with libraries, schematized values, and the ext directory
●
Helm will use a "lifecycle events" emitter/handler model.
●
Helm has an embedded Lua engine for scripting some event handlers. Scripts are
stored in charts.
●
State is maintained with two types of object: Release and a release version Secret
●
Resources created by hooks will now be managed
●
For pull-based DevOps workflow, a new Helm Controller project will be started
●
Cross platform plugins in Lua that only have a runtime dependency on Helm
●
A complementary command to helm fetch to push packages to a repository
More Design details here: https://github.com/helm/community/tree/master/helm-v3
Migrate from Helm v2 to v3
Helm v3 introduces quite a lot of changes.
Both Helm can coexist in the system at present.
helm-2to3 plugin will allow us to migrate Helm v2
configuration and releases to Helm v3 (installed k8s
objects will not be touched)
Migrate everything in place to helm 3
--delete-v2-releases : will delete the helm2 release
--tiller-out-cluster: Tiller is not running in the cluster
In Chart v3 few changes are in place:
requirements.yaml moved to Charts.yaml
requirements.lock moved to Charts.lock
Helm & Operators together..
●
Build Operator with Helm chart using Operator SDK
●
Helm is glorified templating tool.
●
Helm Templatization by values.yaml file & Orchestration via Hooks
●
Same helm for deploying applications (manifests) & control planes (operator)
●
Operator is kubernative objects - Custom Resource/API + Custom Controller
●
Helm chart config through value.yaml or configMap.
●
Add vaidation rule in CRD Yaml file
●
Register CRDs using Helm charts instead of Operator Go code.
●
Add annotations to enable CR discovery & binding
●
More -
●
https://static.sched.com/hosted_files/helmsummit2019/ac/Operators-and-Helm-It-takes-two-to-tan
go.pdf
●
https://docs.okd.io/latest/operators/osdk-helm.html
DEMO
Helm in GKE (Google Kubernetes Engine)
In Demo, we have gone through...
1)Created GKE cluster
2)Installed helm 2 & helm3
3)Deployed app using helm2 & helm3
4)Installed Plugin hel2to3
5)Migrated app from helm2 to helm3
6)Created a new application, build & deploy using helm3
7)Modifed the application, build & deploy using helm3
8)Added a library chart & schema validation
9)Added a Operators to the chart & also upgrade
10)Run kubectl, docker, gcloud commands to see the status at various stages
Summary
✔
k8s Application deployment methods
✔
Helm helps manage Kubernetes applications
✔
New release Helm3 Beta is now available with major chnages
✔
Library charts, Lua templates & Schema validation are new features in helm3
✔
helm2 is in production / currently used
✔
Migration to Helm 3 from version 2 is available as a plugin.
✔
Operators and Helm can co-exists.
More about Helm ......
CNCF SIG Helm -
https://www.cncf.io/announcement/2019/09/12/cloud-native-computing-foundation-announces-application-d
elivery-sig/
Just finished Helm Summit on Sept 11-12 at Amsterdam -
https://events.linuxfoundation.org/events/helm-summit-2019/program/schedule/
Next KubeCon on November 18-21 at San Diego
https://events.linuxfoundation.org/events/kubecon-cloudnativecon-north-america-2019/schedule/
Helm
https://helm.sh
Thank You...

More Related Content

What's hot (20)

PDF
Helm - Application deployment management for Kubernetes
Alexei Ledenev
 
PPTX
Introduction to Helm
Harshal Shah
 
PDF
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
PDF
Helm – The package manager for Kubernetes
FabianRosenthal1
 
PDF
What Is Helm
AMELIAOLIVIA2
 
PDF
Helm - Package Manager for Kubernetes
Knoldus Inc.
 
PDF
CD using ArgoCD(KnolX).pdf
Knoldus Inc.
 
PPTX
Kubernetes Introduction
Eric Gustafson
 
PPTX
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
PDF
ArgoCD Meetup PPT final.pdf
amanmakwana3
 
PDF
GitOps and ArgoCD
Omar Fathy
 
PPTX
Kubernetes CI/CD with Helm
Adnan Abdulhussein
 
PDF
Helm 3
Matthew Farina
 
PPTX
Introduction to kubernetes
Rishabh Indoria
 
PDF
Introduction to kubernetes
Raffaele Di Fazio
 
PDF
An Introduction to Kubernetes
Imesh Gunaratne
 
PDF
Gitlab, GitOps & ArgoCD
Haggai Philip Zagury
 
PDF
Introduction to kubernetes
Gabriel Carro
 
PDF
Free GitOps Workshop + Intro to Kubernetes & GitOps
Weaveworks
 
PDF
Kubernetes 101
Crevise Technologies
 
Helm - Application deployment management for Kubernetes
Alexei Ledenev
 
Introduction to Helm
Harshal Shah
 
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
Helm – The package manager for Kubernetes
FabianRosenthal1
 
What Is Helm
AMELIAOLIVIA2
 
Helm - Package Manager for Kubernetes
Knoldus Inc.
 
CD using ArgoCD(KnolX).pdf
Knoldus Inc.
 
Kubernetes Introduction
Eric Gustafson
 
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
ArgoCD Meetup PPT final.pdf
amanmakwana3
 
GitOps and ArgoCD
Omar Fathy
 
Kubernetes CI/CD with Helm
Adnan Abdulhussein
 
Introduction to kubernetes
Rishabh Indoria
 
Introduction to kubernetes
Raffaele Di Fazio
 
An Introduction to Kubernetes
Imesh Gunaratne
 
Gitlab, GitOps & ArgoCD
Haggai Philip Zagury
 
Introduction to kubernetes
Gabriel Carro
 
Free GitOps Workshop + Intro to Kubernetes & GitOps
Weaveworks
 
Kubernetes 101
Crevise Technologies
 

Similar to Kubernetes Application Deployment with Helm - A beginner Guide! (20)

PDF
helm101.pdf
SamyaBikashSantra1
 
PPTX
Helm.pptx
SISTechnologies
 
PDF
CD in kubernetes using helm and ksonnet. Stas Kolenkin
DataArt
 
PDF
Helm Charts Security 101
Deep Datta
 
PDF
Kubernetes for Java Developers
Anthony Dahanne
 
PDF
5 - Hands-on Kubernetes Workshop:
Kangaroot
 
PDF
Continuous Delivery for Kubernetes Apps with Helm and ChartMuseum
Codefresh
 
PDF
Kubernetes: The Next Research Platform
Bob Killen
 
PPTX
Manage Kubernetes application complexity with Helm
Annie Talvasto
 
PPTX
Leveraging Helm to manage Deployments on Kubernetes
Manoj Bhagwat
 
PDF
CI/CD Across Multiple Environments
Karl Isenberg
 
PPTX
The automation challenge Kubernetes operators vs Helm charts
Ana-Maria Mihalceanu
 
PDF
How to make cloud native platform by kubernetes
어형 이
 
PDF
Helm chart-introduction
Ganesh Pol
 
PDF
Helm - the Better Way to Deploy on Kubernetes - Reinhard Nägele - Codemotion...
Codemotion
 
PDF
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Anthony Dahanne
 
PPTX
Dev opsec dockerimage_patch_n_lifecyclemanagement_
kanedafromparis
 
PDF
Helm Security Webinar
Deep Datta
 
PPTX
Deploying Windows Apps to Kubernetes with Draft and Helm
Jessica Deen
 
PDF
Clocker - How to Train your Docker Cloud
Andrew Kennedy
 
helm101.pdf
SamyaBikashSantra1
 
Helm.pptx
SISTechnologies
 
CD in kubernetes using helm and ksonnet. Stas Kolenkin
DataArt
 
Helm Charts Security 101
Deep Datta
 
Kubernetes for Java Developers
Anthony Dahanne
 
5 - Hands-on Kubernetes Workshop:
Kangaroot
 
Continuous Delivery for Kubernetes Apps with Helm and ChartMuseum
Codefresh
 
Kubernetes: The Next Research Platform
Bob Killen
 
Manage Kubernetes application complexity with Helm
Annie Talvasto
 
Leveraging Helm to manage Deployments on Kubernetes
Manoj Bhagwat
 
CI/CD Across Multiple Environments
Karl Isenberg
 
The automation challenge Kubernetes operators vs Helm charts
Ana-Maria Mihalceanu
 
How to make cloud native platform by kubernetes
어형 이
 
Helm chart-introduction
Ganesh Pol
 
Helm - the Better Way to Deploy on Kubernetes - Reinhard Nägele - Codemotion...
Codemotion
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Anthony Dahanne
 
Dev opsec dockerimage_patch_n_lifecyclemanagement_
kanedafromparis
 
Helm Security Webinar
Deep Datta
 
Deploying Windows Apps to Kubernetes with Draft and Helm
Jessica Deen
 
Clocker - How to Train your Docker Cloud
Andrew Kennedy
 
Ad

More from Krishna-Kumar (20)

PDF
SODA Ambassadors & Community Ecosystem
Krishna-Kumar
 
PDF
Open Source Building Career and Competency
Krishna-Kumar
 
PDF
CCICI CIP 1.0 Testbed - Security access implementation and reference - v1.0
Krishna-Kumar
 
PDF
Google Anthos - Azure Stack - AWS Outposts :Comparison
Krishna-Kumar
 
PDF
Cloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAP
Krishna-Kumar
 
PDF
Cloud interoperability and open standards for digital india open infrasummit
Krishna-Kumar
 
PDF
Google Cloud Container Security Quick Overview
Krishna-Kumar
 
PDF
KubeCon + CloudNativeCon Barcelona and Shanghai 2019 - Highlights
Krishna-Kumar
 
PDF
Introduction to ieee standards development - Bangalore Section
Krishna-Kumar
 
PDF
IEEE Standards Association - Introduction
Krishna-Kumar
 
PDF
IoTShow.in Bangalore 2019 - a Recap on 'IoT and Edge' Talk.
Krishna-Kumar
 
PDF
Kubecon seattle 2018 recap - Application Deployment aspects
Krishna-Kumar
 
PPTX
Open Source Edge Computing Platforms - Overview
Krishna-Kumar
 
PDF
cncf overview and building edge computing using kubernetes
Krishna-Kumar
 
PDF
Evolution of containers to kubernetes
Krishna-Kumar
 
PDF
My Ladakh Marathon Run 2018
Krishna-Kumar
 
PPTX
Containers and workload security an overview
Krishna-Kumar
 
PDF
Now yoga - a study on where why what how
Krishna-Kumar
 
PPTX
CNCF Introduction - Feb 2018
Krishna-Kumar
 
PPTX
KubeCon USA 2017 brief Overview - from Kubernetes meetup Bangalore
Krishna-Kumar
 
SODA Ambassadors & Community Ecosystem
Krishna-Kumar
 
Open Source Building Career and Competency
Krishna-Kumar
 
CCICI CIP 1.0 Testbed - Security access implementation and reference - v1.0
Krishna-Kumar
 
Google Anthos - Azure Stack - AWS Outposts :Comparison
Krishna-Kumar
 
Cloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAP
Krishna-Kumar
 
Cloud interoperability and open standards for digital india open infrasummit
Krishna-Kumar
 
Google Cloud Container Security Quick Overview
Krishna-Kumar
 
KubeCon + CloudNativeCon Barcelona and Shanghai 2019 - Highlights
Krishna-Kumar
 
Introduction to ieee standards development - Bangalore Section
Krishna-Kumar
 
IEEE Standards Association - Introduction
Krishna-Kumar
 
IoTShow.in Bangalore 2019 - a Recap on 'IoT and Edge' Talk.
Krishna-Kumar
 
Kubecon seattle 2018 recap - Application Deployment aspects
Krishna-Kumar
 
Open Source Edge Computing Platforms - Overview
Krishna-Kumar
 
cncf overview and building edge computing using kubernetes
Krishna-Kumar
 
Evolution of containers to kubernetes
Krishna-Kumar
 
My Ladakh Marathon Run 2018
Krishna-Kumar
 
Containers and workload security an overview
Krishna-Kumar
 
Now yoga - a study on where why what how
Krishna-Kumar
 
CNCF Introduction - Feb 2018
Krishna-Kumar
 
KubeCon USA 2017 brief Overview - from Kubernetes meetup Bangalore
Krishna-Kumar
 
Ad

Recently uploaded (20)

PDF
Windows 10 Professional Preactivated.pdf
asghxhsagxjah
 
PDF
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
 
PDF
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
PPTX
Operations Profile SPDX_Update_20250711_Example_05_03.pptx
Shane Coughlan
 
PDF
Understanding the EU Cyber Resilience Act
ICS
 
PPTX
Transforming Lending with IntelliGrow – Advanced Loan Software Solutions
Intelli grow
 
PPTX
Chess King 25.0.0.2500 With Crack Full Free Download
cracked shares
 
PPTX
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
PDF
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
PDF
Show Which Projects Support Your Strategy and Deliver Results with OnePlan df
OnePlan Solutions
 
PDF
AI Software Engineering based on Multi-view Modeling and Engineering Patterns
Hironori Washizaki
 
PPTX
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
PDF
How Attendance Management Software is Revolutionizing Education.pdf
Pikmykid
 
PPTX
MiniTool Partition Wizard Crack 12.8 + Serial Key Download Latest [2025]
filmoracrack9001
 
PDF
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
PDF
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
 
PPTX
Transforming Insights: How Generative AI is Revolutionizing Data Analytics
LetsAI Solutions
 
PDF
Instantiations Company Update (ESUG 2025)
ESUG
 
PDF
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
 
PDF
Meet in the Middle: Solving the Low-Latency Challenge for Agentic AI
Alluxio, Inc.
 
Windows 10 Professional Preactivated.pdf
asghxhsagxjah
 
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
 
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
Operations Profile SPDX_Update_20250711_Example_05_03.pptx
Shane Coughlan
 
Understanding the EU Cyber Resilience Act
ICS
 
Transforming Lending with IntelliGrow – Advanced Loan Software Solutions
Intelli grow
 
Chess King 25.0.0.2500 With Crack Full Free Download
cracked shares
 
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
Show Which Projects Support Your Strategy and Deliver Results with OnePlan df
OnePlan Solutions
 
AI Software Engineering based on Multi-view Modeling and Engineering Patterns
Hironori Washizaki
 
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
How Attendance Management Software is Revolutionizing Education.pdf
Pikmykid
 
MiniTool Partition Wizard Crack 12.8 + Serial Key Download Latest [2025]
filmoracrack9001
 
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
 
Transforming Insights: How Generative AI is Revolutionizing Data Analytics
LetsAI Solutions
 
Instantiations Company Update (ESUG 2025)
ESUG
 
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
 
Meet in the Middle: Solving the Low-Latency Challenge for Agentic AI
Alluxio, Inc.
 

Kubernetes Application Deployment with Helm - A beginner Guide!

  • 1. Krishna Kumar, CNCF Ambassador @krish_00 September 2019, Infosys Campus Bangalore Application Deployment in Kubernetes with
  • 2. Outline  K8s App Deployment Methods!  Helm & Charts ....  Demo – helm in GKE*
  • 3. What’s in Kubernetes ?  Kubernetes: Container Orchestration Engine – abstracts underlying resources to deploy workloads  Micro Services: A fully functional software feature independently accessed as a service  Docker: Package applications in containers  CNCF: Cloud Native Computing Foundation: https://cncf.io Kubenetes – helmsman(pilot);
  • 4. K8s Application Deployment File kubectl apply -f deployment.yaml <deployment.yaml> apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 nginx – application for load balancer 3 pods will be created; one for each replica map of {key,value} pairs indicates that the Pods run one container nginx Docker Hub image at version 1.7.9 Application Service port: 80
  • 5. Application Deployment methods blue/green: New version alongside old version then switching at one point; Rollout/Rollback canary: Release a new version to few users and then decide full rollout based on result a/b testing: Feature testing based on statistics; dark deployment that users are unaware of update rolling: Update new version one after another slowly with no downtime recreate: Create a new one and kill the old one; best for development environments shadow: Both versions are running parallel with not impacting other; mocking services & dependecies like ...... types: Stateless, Statefull, Affinity/Antiaffinity, Declarative/Imperative clusters: Multi Cluster, Hybrid Cloud, Multi Cloud mechanics: Manual, Batch, Package Manager, CI/CD
  • 6. DevOps Pipeline DevOps helps: infrastructure as code continuous integration continuous deployment automated release And do: • Setup in k8s Clusters – Jenkin, Dev & Prod • Production environment with Loadbalancer • Create two namesapces - production & canary • Create jenkin job, build & push to Registry ● Deploy Canary release (dev, prod, etc.) ● And production release ● And more.... https://cloud.google.com/solutions/continuous-delivery-jenkins-kubernetes-engine
  • 7. K8s Application Deployment/Automation Tools... Kubectl – Create, manage and deploy k8s artifacts - https://kubernetes.io/docs/reference/kubectl/ Kustomize - A template-free way to customize application configuration - https://kustomize.io/ CNAB - Cloud Native Application Bundling - https://cnab.io/ Skaffold - building, pushing and deploying your application - https://skaffold.dev/ Spinnakar – Multi cloud continous delivery - https://www.spinnaker.io/ Kudo - Universal declarative Operator - https://kudo.dev Kompose – Move docker file to k8s objects - http://kompose.io/ Draft – Streamlined k8s Deployment - https://draft.sh/ Brigade – Event driven scripting for k8s - https://brigade.sh/ Kashti – Visualization Dashboard for Brigade - https://github.com/brigadecore/kashti Jenkin - k8s plugin & Jenkin X - https://github.com/jenkinsci/kubernetes-plugin Github - Marketplace for tools - https://github.com/marketplace/category/continuous-integration Helm – The package manager for k8s - https://helm.sh/
  • 8. What is Helm? Helm is a package manager, helps you manage Kubernetes applications — define, install, and upgrade even the most complex Kubernetes application. Helm is like apt or yum in linux world Why do we need a package manager ● Application focused Better control ● Container version handling - upgrade/rollback ● Manage dependencies ● Reproducible and shareable Helm initially started with Deis (now with Microsoft) & then Google Deployment Manger team joined to create helm2. Helm is now in CNCF Incubation project - https://helm.sh/ Helm - wheel
  • 9. Charts Chart - Charts are curated application definitions for Helm. A chart is organized as a collection of files inside of a directory - that is package. Charts are placed in repository similar to Docker Registry, Quay, etc. ● Helm’s own Chart Museum - https://chartmuseum.com/ ● CNCF Project Harbor - https://goharbor.io/ ● Gihub charts - https://github.com/helm/charts ● Helm Hub: Charts hosted in many distributed repositories - https://hub.helm.sh/ Helm manages charts, versions and releases Instance of application - Helm Release
  • 10. Sample Chart /<projectName> - Name of the chart ● chart.yaml – Information about chart ● values.yaml – default configuration values ● LICENSE – license for the chart ● README.md – human readable text ● requirements.yaml – dependencies for the chart ● requirements.lock – lock the same version in requiremnts ● /charts/ - dependencies chart upon which this chart depends ● /templates/ - files in go template language https://github.com/helm/charts helm install stable/nginx-ingress --> will install nginx in k8s cluster
  • 11. Helm Releases v2 (v2.14.3) Released in 2016 (Currently production/maintenance) A server in-cluster component was called Tiller, and it handled installing and managing Helm charts. In Helm 2, install created v1, a subsequent upgrade created v2, and so on. In Tiller name space you can store only one instanace name Later Kubernetes introduced RBAC & CRDs. With RBAC, locking down Tiller in production becomes difficult; so start providing permissive default configuration that creted nightmare for DevOps & SREs. So had to move Tiller, instead could simply fetch information from the Kubernetes API server, render the Charts client-side, and store a record of the installation in Kubernetes. With no Tiller, Helm’s permissions are evaluated using your kubeconfig file
  • 12. Helm Releases v3 (v3.0.0-beta.3) The server side component Tiller removed Avoid Security risks Avoid installation complications Installation directly runs on the client No Service account; use existing client accoutns Namespaces are more important and release is tagged to that. One can install multiple instances name each for each namespace with same name. Releases are stored as secrets in the namespace All of the Helm 2 flags still lworks Lua templates are going to be introduced alongside Go templates (some points in future). Introduced Library charts - simply define templates for your other Helm charts to use. Store common information about your applications, without needing to replicate it across multiple Helm charts. Library chart declare in Chart.yaml as dependencies.
  • 13. Helm Releases v3 .. more..... As part of the Design Proposal (some are alredy in helm3) ● Tiller is gone, and there is only one functional component (helm) ● Charts are updated with libraries, schematized values, and the ext directory ● Helm will use a "lifecycle events" emitter/handler model. ● Helm has an embedded Lua engine for scripting some event handlers. Scripts are stored in charts. ● State is maintained with two types of object: Release and a release version Secret ● Resources created by hooks will now be managed ● For pull-based DevOps workflow, a new Helm Controller project will be started ● Cross platform plugins in Lua that only have a runtime dependency on Helm ● A complementary command to helm fetch to push packages to a repository More Design details here: https://github.com/helm/community/tree/master/helm-v3
  • 14. Migrate from Helm v2 to v3 Helm v3 introduces quite a lot of changes. Both Helm can coexist in the system at present. helm-2to3 plugin will allow us to migrate Helm v2 configuration and releases to Helm v3 (installed k8s objects will not be touched) Migrate everything in place to helm 3 --delete-v2-releases : will delete the helm2 release --tiller-out-cluster: Tiller is not running in the cluster In Chart v3 few changes are in place: requirements.yaml moved to Charts.yaml requirements.lock moved to Charts.lock
  • 15. Helm & Operators together.. ● Build Operator with Helm chart using Operator SDK ● Helm is glorified templating tool. ● Helm Templatization by values.yaml file & Orchestration via Hooks ● Same helm for deploying applications (manifests) & control planes (operator) ● Operator is kubernative objects - Custom Resource/API + Custom Controller ● Helm chart config through value.yaml or configMap. ● Add vaidation rule in CRD Yaml file ● Register CRDs using Helm charts instead of Operator Go code. ● Add annotations to enable CR discovery & binding ● More - ● https://static.sched.com/hosted_files/helmsummit2019/ac/Operators-and-Helm-It-takes-two-to-tan go.pdf ● https://docs.okd.io/latest/operators/osdk-helm.html
  • 16. DEMO Helm in GKE (Google Kubernetes Engine)
  • 17. In Demo, we have gone through... 1)Created GKE cluster 2)Installed helm 2 & helm3 3)Deployed app using helm2 & helm3 4)Installed Plugin hel2to3 5)Migrated app from helm2 to helm3 6)Created a new application, build & deploy using helm3 7)Modifed the application, build & deploy using helm3 8)Added a library chart & schema validation 9)Added a Operators to the chart & also upgrade 10)Run kubectl, docker, gcloud commands to see the status at various stages
  • 18. Summary ✔ k8s Application deployment methods ✔ Helm helps manage Kubernetes applications ✔ New release Helm3 Beta is now available with major chnages ✔ Library charts, Lua templates & Schema validation are new features in helm3 ✔ helm2 is in production / currently used ✔ Migration to Helm 3 from version 2 is available as a plugin. ✔ Operators and Helm can co-exists.
  • 19. More about Helm ...... CNCF SIG Helm - https://www.cncf.io/announcement/2019/09/12/cloud-native-computing-foundation-announces-application-d elivery-sig/ Just finished Helm Summit on Sept 11-12 at Amsterdam - https://events.linuxfoundation.org/events/helm-summit-2019/program/schedule/ Next KubeCon on November 18-21 at San Diego https://events.linuxfoundation.org/events/kubecon-cloudnativecon-north-america-2019/schedule/ Helm https://helm.sh Thank You...