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
一起玩 Helm 3
Search
Johnlin
November 30, 2020
Programming
1
100
一起玩 Helm 3
Johnlin
November 30, 2020
Tweet
Share
More Decks by Johnlin
See All by Johnlin
用 MLIR 實作 一個 Ruby IR (intermediate representation)
johnlinvc
0
55
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
200
Ruby 型別檢查工具簡介
johnlinvc
0
410
Swift Actor 實作探索
johnlinvc
0
140
用 mruby 來寫跨平台工具
johnlinvc
0
59
Actor model 簡介
johnlinvc
0
160
為什麼 App 卡卡的
johnlinvc
2
1.1k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
160
Life of a Cell
johnlinvc
0
1.3k
Other Decks in Programming
See All in Programming
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
330
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
200
Go の GC の不得意な部分を克服したい
taiyow
3
780
情報漏洩させないための設計
kubotak
1
130
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
290
선언형 UI에서의 상태관리
l2hyunwoo
0
160
ドメインイベント増えすぎ問題
h0r15h0
2
300
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
720
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1k
良いユニットテストを書こう
mototakatsu
7
2.2k
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
A Tale of Four Properties
chriscoyier
157
23k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
450
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
Optimizing for Happiness
mojombo
376
70k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Statistics for Hackers
jakevdp
796
220k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Side Projects
sachag
452
42k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Transcript
Ұى؝ Helm 3 John Lin (@johnlinvc)
᮫ԙզ • John Lin • Twitter: @johnlinvc • Senior Solution
Architect, DevOps @ West Pharmaceutical
ࣾ܈׆ಈ • iplayground.io 2020 Keynote ߨऀ • Coscup, RubyConf TW,
RubyKaigi, PyCon TW ߨऀ • ओ㭎 Swift Taipei Meetup
ॄኄੋ Helm ? • > Helm is the best way
to find, share, and use software built for Kubernetes. • > Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes application.
Helm ೳ၏ॄኄʁ • ҆ Chart • ઃఆ Chart • Rollback
Chart • ؐ༗ߋଟ
• ؆ᄸိ㘸बੋऔ • kubectl create -f • kubectl edit Helm
ೳ၏ॄኄʁ
҆ • HomeBrew: brew install helm • Linuxɿcurl https://raw.githubusercontent.com/helm/helm/master/scripts/ get-helm-3
| bash • APT: ༗ᴍຑɼՄҎɻ
Helm ໊ࢺղᬶ • Chart • Repo • Config • Release
Chart • Helm త݅ᄸҐ • 㚎ؚ k8s resource template, default
values • ՄҎ༗ dependency • ૾ੋ rpm, deb తײ᧷
Repo • ଘ์ Chart త server • ओཁ༗ၷݸޭೳɿྻग़ Charts Լࡌ
Chart • ಉԙ apt/yum repo
Config • ์ਐ k8s resource template ཫతᆴɻ • Chart ။༗༬ઃᆴɻ
• ՄҎࡏ㑌ݸ release ཫڅෆಉతᆴɻ
Release • Ұݸӡߦதత Chartɼ૾ੋ Process తײ᧷ɻ • धཁڅଞҰݸ໊ࣈɻ • ՄҎ༗ଟݸಉ࣌ӡߦʢ
Chart ሜಘతʣ
༻ Helmɼ Ҏ Prometheus ҝྫ • Prometheus ੋҰ߇ܥ౷ɻk8s ཫେྔ༻ɻ •
https://github.com/prometheus-community/helm-charts/tree/main/charts/ prometheus •
Ճೖ Repo • repo Ճೖ local helm ɻṜᒬ࠽ೳፙ౸ chartɻ
• helm repo add prometheus-community https://prometheus- community.github.io/helm-charts • helm repo add stable https://charts.helm.sh/stable
҆ Chart • ༻ prometheus chart ҆Ұݸ release ໊ҝ demo-promɻ
• helm install demo-prom prometheus-community/prometheus
NOTES.txt • 䋯 install/upgrade ޙ။ग़ݱత㘸໌ɻ • ҰᒬՄҎ༻ templateɻॴҎ௨ৗՄҎෳష্ɻཫ໘త namespace ྨ
తҰൠိ㘸။ੋሣతɻ • export POD_NAME=$(kubectl get pods --namespace default -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}") • kubectl --namespace default port-forward $POD_NAME 9090
Side Topic:HSTS • HTTP Strict Transport Security • Ұୠ༻ https
࿈աతҬɼब࠶ෆೳ༻ http ྃ... • localhost ༗࣌ީҰෆখ৺बෆೳ༻ http ྃ • ՄҎ༻ *.vcap.me ႔ཧɻ *.vcap.me Ӭԕ။ࢦ 127.0.0.1
List release • ྻग़ݱࡏ context Լతॴ༗ release • Helm list
ઃఆ Chart • ༗ၷछํࣜ • --set key1=val1 (ෆਪનɼه೭લଧաॄኄबࢮఆྃʣ • --values
values.yaml ( ՄҎ commit ਐ git )
ઃఆ Chart • values.yaml server: statefulSet: enabled: true •
ߋ৽ Chart • helm upgrade demo-prom prometheus-community/prometheus -f values.yaml
List Release History • ྻग़ release త㑖࢙ل㑚ɻ • helm history
demo-prom
Rollback Release • Rollback release ౸೭લత൛ຊɼแؚ config, chart ൛ຊɻ •
helm rollback demo-prom 1 • helm history demo-prom
႟আ release • helm uninstall demo-prom
ৗݟత • ߋ৽ޙࣗಈੜతີᛰᏓྃɿՄҎࡏ release secret ཫፙ౸ᢜతᆴɼઃఆਐ ჩᏐཫ೭ޙबෆ။Ꮣྃɻ • ৽తઃఆᔒ༗ੜᏈɿChart ᔒ༗ਖ਼֬ઃఆ
Deployment/Statefulset/ DaemonSet తߋ৽ᑍ݅ɻधཁखಈࣥߦ kubectl rollout restartɻ
Helm 2 vs Helm 3 • ᔒ༗ Tiller ɼෆधཁࡏ K8S
Cluster ཫ౦ྃɻ • औফ౷Ұ RepoɼվҝࢄࣜɻՄҎ༻ https://artifacthub.io ፙ Chartɻ • ࢦྩ໊ඍվᏓɻ fetch -> pullɻɻ • ࢧԉ༻ OCI registry ိଘ์ Chart
Helm 2 end of support • Tiller image Մೳᬋ࣌။ํଘ์ɻ •
Helm 2 client Մೳ။ํɼෆա get.helm.sh ။ಈɻ • Stable chart repo https://github.com/helm/charts ࡏ Nov 13, 2020 ਖ਼ࣜऴࢭࢧԉྃɻ
Helm vs Others • Kustomize • Operator
Helm vs Kustomize • Template vs Overlay(Patching) • Rollback •
Helm ՄҎࡏ post rendering hook ཫ໘ݺڣ Kustomize • https://github.com/thomastaylor312/advanced-helm-demos/tree/master/ post-render
Helm vs Operator • Day 1 (Helm) vs Day 2(Operator)
• ޓิɼhelm ෛ҆ ɼ Operator ෛӡ࡞ɻ • ՄҎ༻ helm chart ိ෦ॺ Operator • https://sdk.operatorframework.io/docs/building-operators/helm/ quickstart/
መ • ෆཁ༻ chart ɼఆٛࣗݾత chart ɼ࠶֎෦త chart ఆٛҝ dependencyɻᙛ༻
configmap/secret ိ၏ઃఆ࣌࠽ํศɻ • ༻ helmfile + helm secrets plugin ိ၏ GitOpsɼҰଘ์ࡏ Git ཫɻ • ળ༻ helm త plugin ܥ౷ɼՄҎఏڙڐଟֹ֎తޭೳɻ
ະ᠃ • ։ᚙࣗݾత Helm Chart • ༻ helmfile • ։ᚙࣗݾత
Helm Plugin
Q&A • Twitter: @johnlinvc • Өยࡏ https://bit.ly/39pcPiM • We're
hiring DevOps @ West Pharma, Deploying to hybrid cloud with K8Sɻ