SlideShare ist ein Scribd-Unternehmen logo
1 von 52
Downloaden Sie, um offline zu lesen
容器化後,持續交付不可缺的敲門磚
Helm
1
Hello!
陳宏彥 (Zz Chen)
chy168@gmail.com
Kidscrape, co-founder / CTO
Taipei HashiCorp User Group,
co-organizer
2
3
http://bit.ly/taipei-hug
4
https://github.com/Taipei-HUG/workshop
實戰工作坊
Infrastructure as Code
Terraform ❤ AWS EKS
09/15 -> 10/06
大綱
- 故事背景
- Helm 介紹
- 導入案例
- 未來發展
5
故事的開始 ...
6
哦?好像可以幫別人家導(ㄘㄜˋ)入(ㄕˋ)新玩具 XD 7
● 技術負責人願意嘗試導入
● Terraform
○ VMs
○ Network
● Ansible
○ Packages
○ Code
Deployment
● Google Cloud
Background
GCP
Compute Engine
Multiple Instances
Cloud Load
Balancing
Compute
Engine
8
Problems
● Many VMs
● Configurations with environments
○ beta, staging, production
○ MySQL, Redis, Cassandra, MongoDB .. etc
● Cost much time to deploy
● Struggle with local development
Created by Aopsan - Freepik.com
9
To Containerize Everything
10
● Containerized
○ 10 Components
○ 35 Workers
○ 30 Jobs
● Migrate to kubernetes
Objectives
Compute
Engine
Kubernetes Engine
11
18 Days
production ready
禁
止
酒
駕
飲
酒
過
量
有
害
健
康
12
Pros
● Fast code deployment and rolling
upgrade
● K8s managed resource
○ Ingress (LoadBalancer, SSL)
○ Less Terraform
● Decouple configurations
○ redis-dev, redis-beta,
redis-prod => k8s service
○ redis-service => In Image
Pros & Cons
13
Cons
● Bunch of k8s manifests
○ YAMLs x Environments
● Deployment knowledge
○ manifest creation order,
parameters
How we work with k8s?
14
Nginx
Deployment
Nginx
Service
Ingress
nginx-deployment.yaml
15
nginx-service.yaml
nginx-ingress.yaml
Nginx deployment
Nginx service
Nginx ingress
Application 1
deployment
Application 1
service
Application 1
ingressworker
deployment
cronjobs
16
17
Nginx deployment
kubectl create -f
kubectl apply -f
Nginx service
kubectl create -f
kubectl apply -f
Ingress
kubectl create -f
kubectl apply -f
Application 1
kubectl create -f
kubectl apply -f
Application 2
kubectl create -f
kubectl apply -f
Application 2
kubectl create -f
kubectl apply -f
18
Designed by Kues / Freepik 19
Helm
20
Helm is a package manager
Homebrew / Apt / Yum / Portage ...
21
Helm is ...
● Template engine
● Release management
● Portability & easy onboard
● Repository hosting
● Versioning & dependency
● No more `kubectl apply`
Management Repository
Easy Update Release
22
Chart Repository
Packaged k8s
resources
ReleaseChart
Stored &
packaged charts
Deployed instance
of a chart
23
Two Components
Kubernetes Cluster
Tiller
Pod
Helm Client
K8S Master
Nginx
Deployment
API
Deployment
MySQL
Deployment
24
$ helm install nginx
Releases Management
$ helm upgrade
$ helm rollback
$ helm history
Nginx Chart
Release #3
Release #2
Release #1
install
$ helm install
25
$ helm create CHART_NAME
$ helm create devopsdays-taipei2018
26
Chart creating
Template
# templates/deployment.yaml
27
Values
# values.yaml
28
29
template.yaml values.yaml
OUTPUT
template func
30
defined template
call it
render result
31
DEMO
Let’s Helming in 5 mins!
32
● if we have workers ...
○ make-money
○ count-money
○ push-notification
○ statistics
○ .....
An Example
自製 worker generator
(簡化管理複雜度)
33
34
Worker generator
define common.worker template
&
iterate by `.Values.workers`
35
generator
+
values
make-money count-money
push-notification
statistics
36
省85%
方便重複性 workload 的新增、更新、管理
37
Daily Use of Helm
Workflow, Pipeline and Testing
38
DevOps Chart
Repository
& git
Kubernetes Cluster
Nginx
Deployment
API
Deployment
MySQL
Deployment
Docker Image
Registry & git
Deveoper
CI/CD Tool
Nginx
Deployment
API
Deployment
MySQL
Deployment
production
devloping
values-prod.yaml
values-dev.yaml
39
Comparison
V1 V2 V3
Runtime VM Kubernetes Kubernetes
Infra Terraform Terraform Terraform
Config Management Ansible Ansible Ansible
Build Image N/A Packer Packer
Deployment Ansible (kubectl apply)+ helm upgrade
Deployment Time 3~5m 3m ~30sec
Cost 900 USD 350 USD 350 USD
Instances 30 3 3
40
Comparison of Code Lines
Tools V1 V2 V3
Image
Ansible 2070 1351 1351
Packer N/A 972 972
Total (Build Image) 2070 2323 2323
Infra
Terraform 1663 ~100 ~100
K8s Manifest N/A 2045
Helm N/A N/A 2053
Total (Infra) 1663 2145 2153
Total 3733 4468 4476
41
● High portability
● Switch environments easily
● Decouple phased config/image
● Reusable for same type deployment (worker, jobs ... etc)
● Version control for deployment
Advantages
42
Disadvantages
● Helm
○ Hard to troubleshoot
■ No diff
■ Tiller upgrade failed without error
■ Generate full k8s Manifest
○ => Helm 3
● For team
○ Need to know Helm/k8s
○ Gap between Engineer and DevOps
■ Still need DevOps efforts
○ Who can deploy? How to trigger?
○ Who write the Chart?
○ => GitOps
43
Helm 3
44
Helm 2.x
● Template syntax hard to read & poor documentation
● Immutable variables, confusing data types, restrictive scoping
● Cannot define function in template
● Resources created by hooks are NOT managed
45
New in Helm 3
● Lua as embedded scripting language
○ Scripts are stored in charts
● No more Tiller
○ Security enhancement
○ New Helm controller
● Hooks can be managed
● Pull-based DevOps workflow with Helm controller
46
容器化了,然後呢?
Helm 可以說是 GitOps 敲門磚
47
RD自助餐興起
應用想上 K8S?自己動手做吧!
48
GitOps 潮流
● Draft
● Flux
● Gitkube
● Helm 3
● Jenkins X
● Knative
● Skaffold
They all support Helm
49
50https://github.com/kubernetes/kubernetes/pull/68428 Powered by kubernetes/test-infra
Key Takeaways
● Containerized and migrate to kubernetes, refactor by Helm
○ Save money, Increase productivity
○ Reduce deployment time
○ Release management
● Key to the future, Helm 3 and GitOps
51
謝謝
52

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

ReactとSeleniumの幸せな関係
ReactとSeleniumの幸せな関係ReactとSeleniumの幸せな関係
ReactとSeleniumの幸せな関係
 
Apache Avro vs Protocol Buffers
Apache Avro vs Protocol BuffersApache Avro vs Protocol Buffers
Apache Avro vs Protocol Buffers
 
2023 COSCUP - Whats new in PostgreSQL 16
2023 COSCUP - Whats new in PostgreSQL 162023 COSCUP - Whats new in PostgreSQL 16
2023 COSCUP - Whats new in PostgreSQL 16
 
kubernetes를 부탁해~ Prometheus 기반 Monitoring 구축&활용기
kubernetes를 부탁해~ Prometheus 기반 Monitoring 구축&활용기kubernetes를 부탁해~ Prometheus 기반 Monitoring 구축&활용기
kubernetes를 부탁해~ Prometheus 기반 Monitoring 구축&활용기
 
新たなgitのブランチモデル「Git Feature Flow」!Git Flow,Git Hub Flow,Git Lab Flowを超えれるか?
新たなgitのブランチモデル「Git Feature Flow」!Git Flow,Git Hub Flow,Git Lab Flowを超えれるか?新たなgitのブランチモデル「Git Feature Flow」!Git Flow,Git Hub Flow,Git Lab Flowを超えれるか?
新たなgitのブランチモデル「Git Feature Flow」!Git Flow,Git Hub Flow,Git Lab Flowを超えれるか?
 
[GitOps] Argo CD on GKE (v0.9.2).pdf
[GitOps] Argo CD on GKE (v0.9.2).pdf[GitOps] Argo CD on GKE (v0.9.2).pdf
[GitOps] Argo CD on GKE (v0.9.2).pdf
 
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CDA GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
Learn O11y from Grafana ecosystem.
Learn O11y from Grafana ecosystem.Learn O11y from Grafana ecosystem.
Learn O11y from Grafana ecosystem.
 
Creating Highly Available MongoDB Microservices with Docker Containers and Ku...
Creating Highly Available MongoDB Microservices with Docker Containers and Ku...Creating Highly Available MongoDB Microservices with Docker Containers and Ku...
Creating Highly Available MongoDB Microservices with Docker Containers and Ku...
 
Secrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on KubernetesSecrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on Kubernetes
 
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
 
Serverless integration with Knative and Apache Camel on Kubernetes
Serverless integration with Knative and Apache Camel on KubernetesServerless integration with Knative and Apache Camel on Kubernetes
Serverless integration with Knative and Apache Camel on Kubernetes
 
Proyecto web Php-MySQL-Ajax-Flex
Proyecto web Php-MySQL-Ajax-FlexProyecto web Php-MySQL-Ajax-Flex
Proyecto web Php-MySQL-Ajax-Flex
 
The myths of deprecating docker in kubernetes
The myths of deprecating docker in kubernetesThe myths of deprecating docker in kubernetes
The myths of deprecating docker in kubernetes
 
Designing a complete ci cd pipeline using argo events, workflow and cd products
Designing a complete ci cd pipeline using argo events, workflow and cd productsDesigning a complete ci cd pipeline using argo events, workflow and cd products
Designing a complete ci cd pipeline using argo events, workflow and cd products
 
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
 
Percona server for MySQL 제품 소개
Percona server for MySQL 제품 소개Percona server for MySQL 제품 소개
Percona server for MySQL 제품 소개
 

Ähnlich wie 容器化後,持續交付不可缺的敲門磚 - Helm

Ähnlich wie 容器化後,持續交付不可缺的敲門磚 - Helm (20)

Bandwidth: Use Cases for Elastic Cloud on Kubernetes
Bandwidth: Use Cases for Elastic Cloud on Kubernetes Bandwidth: Use Cases for Elastic Cloud on Kubernetes
Bandwidth: Use Cases for Elastic Cloud on Kubernetes
 
HPC on OpenStack
HPC on OpenStackHPC on OpenStack
HPC on OpenStack
 
Kubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on KubernetesKubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on Kubernetes
 
Making Service Deployments to AWS a breeze with Nova
Making Service Deployments to AWS a breeze with NovaMaking Service Deployments to AWS a breeze with Nova
Making Service Deployments to AWS a breeze with Nova
 
Free GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOpsFree GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOps
 
CERN OpenStack Cloud Control Plane - From VMs to K8s
CERN OpenStack Cloud Control Plane - From VMs to K8sCERN OpenStack Cloud Control Plane - From VMs to K8s
CERN OpenStack Cloud Control Plane - From VMs to K8s
 
運用高效、敏捷全新平台極速落實雲原生開發
運用高效、敏捷全新平台極速落實雲原生開發運用高效、敏捷全新平台極速落實雲原生開發
運用高效、敏捷全新平台極速落實雲原生開發
 
Clustering tensor flow con kubernetes y raspberry pi
Clustering tensor flow con kubernetes y raspberry piClustering tensor flow con kubernetes y raspberry pi
Clustering tensor flow con kubernetes y raspberry pi
 
reBuy on Kubernetes
reBuy on KubernetesreBuy on Kubernetes
reBuy on Kubernetes
 
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes MeetupMetal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
 
Build and Run Containers With Lazy Pulling - Adoption status of containerd St...
Build and Run Containers With Lazy Pulling - Adoption status of containerd St...Build and Run Containers With Lazy Pulling - Adoption status of containerd St...
Build and Run Containers With Lazy Pulling - Adoption status of containerd St...
 
How to Puppetize Google Cloud Platform - PuppetConf 2014
How to Puppetize Google Cloud Platform - PuppetConf 2014How to Puppetize Google Cloud Platform - PuppetConf 2014
How to Puppetize Google Cloud Platform - PuppetConf 2014
 
Scientific Computing @ Fred Hutch
Scientific Computing @ Fred HutchScientific Computing @ Fred Hutch
Scientific Computing @ Fred Hutch
 
Environment management in a continuous delivery world (3)
Environment management in a continuous delivery world (3)Environment management in a continuous delivery world (3)
Environment management in a continuous delivery world (3)
 
6 Months Sailing with Docker in Production
6 Months Sailing with Docker in Production 6 Months Sailing with Docker in Production
6 Months Sailing with Docker in Production
 
Distributed tensorflow on kubernetes
Distributed tensorflow on kubernetesDistributed tensorflow on kubernetes
Distributed tensorflow on kubernetes
 
Distributed tensorflow on kubernetes
Distributed tensorflow on kubernetesDistributed tensorflow on kubernetes
Distributed tensorflow on kubernetes
 
Heroku to Kubernetes & Gihub to Gitlab success story
Heroku to Kubernetes & Gihub to Gitlab success storyHeroku to Kubernetes & Gihub to Gitlab success story
Heroku to Kubernetes & Gihub to Gitlab success story
 
Kubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and ServicesKubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and Services
 
What’s New in ScyllaDB Open Source 5.0
What’s New in ScyllaDB Open Source 5.0What’s New in ScyllaDB Open Source 5.0
What’s New in ScyllaDB Open Source 5.0
 

Kürzlich hochgeladen

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 

Kürzlich hochgeladen (20)

Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 

容器化後,持續交付不可缺的敲門磚 - Helm