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
2k
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.1k
Other Decks in Technology
See All in Technology
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
強いチームと開発生産性
onk
PRO
35
11k
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
130
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.2k
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
290
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
330
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
DynamoDB でスロットリングが発生したとき/when_throttling_occurs_in_dynamodb_short
emiki
0
250
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
SSMRunbook作成の勘所_20241120
koichiotomo
3
160
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
130
Featured
See All Featured
BBQ
matthewcrist
85
9.3k
Scaling GitHub
holman
458
140k
RailsConf 2023
tenderlove
29
900
Building Adaptive Systems
keathley
38
2.3k
How STYLIGHT went responsive
nonsquared
95
5.2k
Gamification - CAS2011
davidbonilla
80
5k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
The Language of Interfaces
destraynor
154
24k
Code Reviewing Like a Champion
maltzj
520
39k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
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͕͓ͦΒ͘࠷ଟػೳ • ൺֱݕ౼ީิʹೖΕΔͱɺඞཁͳػೳͷߟྀ࿙Ε͕ݮΒͤΔ͔