Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Helmfile: Supercharge your deployment pipeline
Search
KUOKA Yusuke
May 27, 2020
Technology
4
2.1k
Helmfile: Supercharge your deployment pipeline
https://k8sjp.connpass.com/event/175030/
KUOKA Yusuke
May 27, 2020
Tweet
Share
More Decks by KUOKA Yusuke
See All by KUOKA Yusuke
Migrating to EKS
mumoshu
0
440
Kubernetes on AWS/EKSベストプラクティス2019.2 #jawsdays
mumoshu
34
16k
[5 min. LT] Kubernetes on AWS after EKS & Recommendations on production EKS clusters
mumoshu
4
6.5k
Zero to Anomaly Detection with Kubeflow
mumoshu
1
2.2k
Programming on Kubernetes - Do More With Less
mumoshu
6
1.1k
Sustainable Kubernetes
mumoshu
16
4.2k
Kubernetesへのデプロイメント 〜進化の過程と展望〜 後半パート
mumoshu
2
9.1k
Helmfile - A declarative way to deploy Helm charts -
mumoshu
5
9.6k
Rails on Kubernetes 2018 #railsdm
mumoshu
10
9.2k
Other Decks in Technology
See All in Technology
Qiita埋め込み用スライド
naoki_0531
0
860
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
280
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
210
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
370
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
190
ずっと昔に Star をつけたはずの思い出せない GitHub リポジトリを見つけたい!
rokuosan
0
150
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
510
2024年にチャレンジしたことを振り返るぞ
mitchan
0
130
PHPからGoへのマイグレーション for DMMアフィリエイト
yabakokobayashi
1
160
大幅アップデートされたRagas v0.2をキャッチアップ
os1ma
2
520
LINE Developersプロダクト(LIFF/LINE Login)におけるフロントエンド開発
lycorptech_jp
PRO
0
120
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Rails Girls Zürich Keynote
gr2m
94
13k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Speed Design
sergeychernyshev
25
670
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Transcript
Helmfile Supercharge your deployment pipeline Yusuke Kuoka / @mumoshu, Z
Lab Corporation
“Deploying to K8s is unnecessarily hard”
“Deploying to K8s is unnecessarily hard” • ʮKubernetesͷσϓϩΠͳΜΘ͔ΒΜʯ • kubectl
apply -f dir/ ҰͰ? • ͍͍͑͑
Α͋͘Δύϥϝʔλ • ϚχϑΣετॻ͖͍ͨ vs Ͱ͖Δ͚ͩॻ͖ͨ͘ͳ͍ • DRYʹ͍ͨ͠ vs ͨ͘͠ͳ͍ •
ࣗͰCI/CDΈ͍ͨ vs ͍ͤͨ • (ηΩϡϦςΟ|ύϑΥʔϚϯε|etc) ʹͩ͜ΘΔ vs ͩ͜ΘΒͳ͍ • KubernetesͷॊೈੑΏ͑બࢶ͕ଟ͍
Α͋͘Δ՝ • ૿͑ଓ͚Δπʔϧ • kubectl, kustomize, helm, kpt, go(client-go +
whatever), etc. • ཚཱ͢ΔWrapper • make, bash, ruby, go, js, yaml(CircleCI config.yml, GitHub Actions Workflow, …) • ߏཧ • WrapperͲ͜ (ΞϓϦέʔγϣϯϨϙδτϦ?ConfigRepo? • OSSͷެࣜϚχϑΣετ/ChartΛͦͷ··ͬͯΔͷ͔ɺforkͯ͠Δͷ͔ • forkͯ͠ΔͳΒࠩͲ͔͜ • πʔϧͷظ͢Δόʔδϣϯ?
Α͋͘Δରࡦ • ૿͑ଓ͚Δπʔϧ ← ϕετϓϥΫςΟεͷυΩϡϝϯτԽ • ཚཱ͢ΔWrapper ← ڞ௨ԽɾࣾπʔϧԽ •
ߏཧ ← نΛͭ͘Δ
ΊͰͨ͠ΊͰͨ͠?
Α͋͘Δ՝ - Phase 2 • ૿͑ଓ͚ΔυΩϡϝϯτπʔϧͷϝϯςφϯε • ेʹςετ͞Εͳ͍ࣾπʔϧ • ૿͑ଓ͚Δن
“Deployment on K8s is unnecessarily hard” • <—ίετେ— πʔϧઐνʔϜ, WG,
ਆ(K8s͓͡͞Μ), ϘϥϯςΟΞ —খ—> • େίετ͔͚ͨ΄͏͕πʔϧͱ͍ͯ͘͢͠ͳΔ(ܦݧଇ • ͏·͍͘͘·ͰίετΛ͔͚ଓ͚Δ͔ʁˠجຊతʹYes • ʢͰ͖Εʣ࠷খݶͷίετͰΛղܾ͍ͨ͠ • ୭͔͕طʹૺ۰ͨ͠ճආ͍ͨ͠ • େ͖ͳϛεΛճආ͍ͨ͠ • طଘπʔϧͳ͍ͷ͔ʁ
Helmfile
Helmfile: HISTORY & NUMBERS HelmϕʔεͷએݴతσϓϩΠπʔϧ https://github.com/roboll/helmfile/ - Nov. 2016: First
Commit by @roboll (Datadog) - Feb. 2018: @mumoshu as maintainer - Apr. 2018: ϓϩμΫγϣϯͰΘΕ࢝ΊΔ - 200ίϛοτɾ100ϦϦʔε/ - 2.1K GitHubελʔ @ 2020/05
Helmfile Benefits • πʔϧཚཱ ← ϚχϑΣετɾHelm Chartɾkustomizeαϙʔτ • ཚཱ͢ΔWrapper ←
helmfile͕kubectl/kustomize/helmͷڞ௨ Wrapperʹ • ߏཧ ← نΛͭ͘ΔͷͰͳ͘ɺhelmfileͷنΛར༻
Helm
Helmfile (helmfile.yaml)
Helmfile + Kustomize (./deploy/prod/kustomization.yamlΛHelmͰΠϯετʔϧ)
Helmfile as a “Wrapper” (ར༻πʔϧʹؔΘΒͣ౷ҰతͳίϚϯυͰෳΞϓϦΛҰׅཧ)
ߏཧ - ϓϩδΣΫτϧʔτʹ helmfile.yaml Λஔ͘ - ϓϩδΣΫτΘͣɺͨͩhelmfileΛ ࣮ߦ͢Δ͚ͩͰσϓϩΠՄೳ - ༨ྗ͕͋ΕͦΕҎ֎ͷཁૉͷ໋໊ن
ଇϑΝΠϧͷஔ͖ͷϧʔϧΛܾΊ Δ
ศརػೳ • Diff • όʔδϣϯϩοΫ • ϚχϑΣετੜ • Secretཧ •
Values provider: AWS SecretsManager/Vault/SOPS/Terraform State • DAG • σόοάࢧԉ (helmfile build, helmfile —debug)
None
None
None
None
Alternatives • Terraform + Kubernetes/Helm provider • Pulumi + Kubernetes
provider • AWS CDK / cdk8s • KPT (https://github.com/GoogleContainerTools/kpt) • Terraform + terraform-provider-helmfile
terraform-provider-helmfile https://github.com/mumoshu/terraform-provider-helmfile
Also see… • helmfile.yamlαϯϓϧू https://github.com/cloudposse/helmfiles • Helmfileͷsecret refػೳͰ͑ΔόοΫΤϯυ https://github.com/variantdev/vals/
·ͱΊ • Kubernetes ͚ͷσϓϩΠҙ֎ͱ໘ʢબࢶ͕ଟ͍͕ނʣ • kubectl/helm/kustomizeΛϥοϓ͢Δπʔϧ͕ಠࣗ։ൃ͞Ε͕ͪ • υΩϡϝϯτπʔϧͷ࡞ɾϝϯςίετ࠷খݶʹ͍ͨ͠ • ಠࣗ։ൃ෦ΛݮΒ͢
/ ཁ݅ʹ͋͏طଘπʔϧ͕͋Εར༻ • Helmfile͕͓ͦΒ͘࠷ଟػೳ • ൺֱݕ౼ީิʹೖΕΔͱɺඞཁͳػೳͷߟྀ࿙Ε͕ݮΒͤΔ͔