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
Kubernetes helm & helmc
Search
Aya (Igarashi) Ozawa
June 20, 2016
Technology
3
3.5k
Kubernetes helm & helmc
Helm is package management tool for Kubernetes.
This slide describe how to use helm!
Aya (Igarashi) Ozawa
June 20, 2016
Tweet
Share
More Decks by Aya (Igarashi) Ozawa
See All by Aya (Igarashi) Ozawa
To Infinity and Beyond: Seamless autoscaling with in-place resource resize for Kubernetes Pods
ladicle
0
140
FinOps! Optimizing Kubernetes Costs with Karpenter
ladicle
0
140
Kubernetes: API Priority and Fairness
ladicle
1
730
FinOps! karpenterによるk8sコスト削減
ladicle
2
690
明日から使える(?)逆引きKubernetes
ladicle
2
1.3k
Recap: KubeCon+CloudNativeCon 2021 NA / Kubernetes Meetup Tokyo #47
ladicle
0
280
KubeCon+CloudNativeCon Europe 2020 Overview
ladicle
0
210
Think Design About Pretty kubectl Plugins
ladicle
0
380
Kubernetesを拡張して日々のオペレーションを自動化する
ladicle
18
7.6k
Other Decks in Technology
See All in Technology
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
4
230
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
620
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
アジャイルでの品質の進化 Agile in Motion vol.1/20241118 Hiroyuki Sato
shift_evolve
0
170
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
540
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
330
Lambdaと地方とコミュニティ
miu_crescent
2
370
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
420
Optimizing for Happiness
mojombo
376
70k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
BBQ
matthewcrist
85
9.3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Transcript
1 k8s helm & helmc Kubernetes meetup Tokyo #2
2 ABOUT ME Software Engineer I’m developing cloud services. AYA
IGARASHI NTT Communications @Ladicle
3 AGENDA INTRODUCTION 01 02 03 ࠓ·Ͱͷཧํ๏ 04 HOW TO
MANAGE MANIFESTS? ABOUT K8S HELM & HELMC WHICH IS BETTER? HAPPY HELMING ͲΜͳͷ͔ɺҧ͍Կ͔ ͲͪΒΛͲͷΑ͏ͳߏͰ͏͖͔ ·ͱΊ
4 How to mange Manifests?
5 BASH MANAGEMENT of MANIFEST 1 source env.sh 2 printf
"cat <<++EOS\n%s\n++EOS\n" "$(cat *service.yaml *deployment.yaml)" \ 3 | sh > all-in-one.yaml ڥ͝ͱʹมߋ͍ͨ͠Λbashมͱͯ͠ManifestʹຒΊࠐΈɺ ࣮ߦ͍ͨ͠ڥͷઃఆϑΝΠϧΛಡΈࠐΜͰ͔ΒγΣϧܳΛ͍ͯͨ͠ ࠓ·Ͱ 1 apiVersion: extensions/v1beta1 2 kind: Deployment 3 metadata: 4 name: rabbitmq${SUFFIX} 5 spec: 6 replicas: ${REPLICA_NUMBER} 7 template: 8 metadata: 9 labels: 04 02 rabbitmq-deployment.yaml labelsҎ߱লུ͍ͯ͠Δ install-service-and-deployment.sh env.shͷதͰมΛexport
6 PROBLEMS MANAGEMENT of MANIFEST 01 DUPLICATE DEFINITIONS containersͷenvϑΟʔϧυʹෳͷϑΝΠϧʹڞ ௨ͷڥม͕ఆٛ͞Ε͍ͯΔͨΊɺमਖ਼࿙Ε͕
ൃੜ͢Δɻ(࿈ྻ͕͍͍ͨ….) 02 HARD TO READ γϯϓϧʹߏతͳมΛఆٛͰ͖ͳ͍ͨΊઃఆ ϑΝΠϧ͕ಡΈͮΒ͍ɻ 03 YAML LINT IS NOT ENOUGH ৺ͷฏԺͷͨΊmanifestΛk8sΠϯετʔϧ͢Δલ ʹࢼݧΛ࣮ࢪ͔͕ͨͬͨ͠ɺYAML lintͰ݁Ռ͕ PASSEDͰ͋ͬͯk8sͰಈ͔ͳ͍͜ͱ͕ଟʑ͋ͬͨɻ PROBLEM BASH
7 By Helm
8 What is Helm? ABOUT K8S HELM & HELMC GolangͷTemplate֦ுϥΠϒϥϦͰ͋ΔSprigͷه๏ΛͬͯManifestϑΝΠϧΛ
ఆٛ͢Δ͜ͱ͕Ͱ͖Δɻ·ͨɺαϒίϚϯυͱͯ͠จ๏νΣοΫΛߦ͏ lintίϚϯυ͕ఏڙ͞Ε͍ͯΔɻ K8SͷύοέʔδϚωʔδϟ 1 # Githubb্Ͱެ։͞Ε͍ͯΔnginxύοέʔδΛݕࡧ 2 $ helmc search nginx 3 example-nginx - An example nginx + git-sync application 4 nginx - Nginx http service 5 nginx-alpine - Nginx http service 6 7 # KubernetesnginxΛΠϯετʔϧ͢Δ 8 $ helmc install nginx 9 ---> No chart named "nginx" in your workspace. Fetching now. 10 ---> Running `kubectl create -f` ... 11 service "nginx" created 12 replicationcontroller "nginx" created 13 ---> Done
9 Diff Helm Helmc
10 ALL Different HELM CLASSIC KUBERNETES HELM Oct 18, 2015ʹDEISʹΑͬͯ࡞ΒΕͨ
CLIͰChartͷ࡞/আ/ߋ৽͕Ͱ͖Δɻ ChartͷόʔδϣϯGitͷSHAsͰఆ ͞Ε͍ͯΔɻ Nov 1, 2015ʹk8sऔΓࠐ·ΕͨΫϥΠΞ ϯταʔόܕͷπʔϧɻ12FactorAppͷࢥ ΛͱʹChart + Config = Release ͱ͍͏ ߏΛͱ͍ͬͯΔɻ What is Chart? k8sͷΠϯελϯεΛ࡞͢ΔͨΊʹඞཁͳ ςϯϓϨʔτ/ͷू߹ମ
11 02 KUBERNETES GITHUB install uninstall NGINX WORD PRESS MYSQL
HELMC CHART FILES publish, fetch Create using kubectl Helm Classic ABOUT K8S HELM & HELMC
12 02 KUBERNETES install chart delete Release TILLER CHART FILES
Kubernetes Helm ABOUT K8S HELM & HELMC HELM REST/JSON gRPC STORAGE NGINX WORD PRESS MYSQL Create Chart files contain Chart packages Package Chart files NGINX CHART PACKAGE get/update Release TarBall
13 Which is Better?
14 Which is better? Kubernetes Helm·ͩόʔδϣϯAlpha-1͕ϦϦʔε͞Ε ͔ͨΓͰಈ͔ͳ͍ͷ͕ଟ͍ͨΊɻ Which is better?
Now HELM CLASSIC Helm Classicϝϯςφϯε͞Εͳ͘ͳΔͨΊɺ͋Δఔ҆ఆ͔ͯ͠ ΒҠͬͨํ͕Α͍ɻϩʔυϚοϓʹΑΔͱBeta1ʹChart.yamlͷ ϑΥʔϚοτΛFix͢ΔΒ͍͠ͷͰͦͷࠒʹҠಈͯ͠Αͦ͞͏ ROAD MAP: https://github.com/kubernetes/helm/issues/694 Feature KUBERNETES HELM
15 How to use Helmc
16 How to use Helmc? WHICH IS BETTER? ςϯϓϨʔτͱมݟ௨͕͠Α͍Α͏ʹσΟϨΫτϦΛ৽ͨʹ͍ͬͯΔɻ ·ͨɺมڥ͝ͱʹϑΝΠϧΛׂ͠ڞ௨ͷσϑΥϧτtemplateʹఆ͍ٛͯ͠Δɻ
FILE STRUCTURE Variable file format HelmcͰมϑΝΠϧͷϑΥʔϚοτJSON/ YAML/TOMLͷத͔ΒબͰ͖Δ͕ɺk8s HelmTOML ͷΈͷͨΊɺҠߦͷ͔͢͠͞ΒTOML͕͓͢͢Ί deployments-generator.sh ࣍ϖʔδͰઆ໌͢ΔCustomize generator͔Βݺͼͩ ͍ͯ͠ΔManifestͷੜεΫϦϓτ └── rabbitmq ├── Chart.yaml ├── README.md ├── deployemnts-generator.sh ├── manifests ├── templates │ ├── service.yaml │ └── deployment.yaml └── variables └── lab1.toml.tpl └── lab2.toml.tpl
17 Custom Generator WHICH IS BETTER? deployments-generator.sh (ൈਮ) ( 1
# helm:generate $HELM_GENERATE_DIR/deployemnts-generator.sh 2 apiVersion: extensions/v1beta1 3 kind: Deployment 1 echo "deploymentType = \"${type}\"" > $tempdir/values.toml 2 3 for type in "age" "hoge"; do 4 helmc template -d $tempdir/values.toml \ 5 -o manifests/${type}-deployment.yaml $HELM_GENERATE_FILE 6 done deployment.yaml (ൈਮ) templateίϚϯυΛͬͯManifestΛੜ͢Δͱ֤ϑΝΠϧຖʹ࣮ߦ͠ͳ͚ΕͳΒͳ͍͕ɺgenerateί ϚϯυΛ༻͢ΔͱҎԼͷdeployment.yamlͷΑ͏ʹҰߦʹgenerator͕ࢦఆ͞Ε͍ͯΔͷΛChartσΟ ϨΫτϦͷத͔Βऩू͠ɺҰׅͯ͠ManifestΛੜ͢Δ͜ͱ͕Ͱ͖Δɻ(Jenkinsͱͷ૬ੑΑ͠ʂ)
18 More Information
19 More Information HAPPY HELMING 01 02 03 http://slack.kubernetes.io/ KUBERNETES
SLACK #HELM CHANNEL MEETING ON ZOOM JAPANESE DOCUMENT Contribution ·ͩ·ͩ࢝·͔ͬͨΓͷ໘ന͍ϓϩδΣΫτ খ͞ͳόάFIXͰRV, MG͞ΕΔ खॱଞͷk8sϓϩδΣΫτͱಉ͡Ͱ͢ https://engineyard.zoom.us/j/ https://github.com/Ladicle/kubernetes-helm-jp-doc
20 HAPPY HELMING! Thanks for watching @ladicle