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.6k
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
KubeCon: To Infinity and Beyond: Seamless autoscaling with in-place resource resize for Kubernetes Pods
ladicle
0
180
FinOps! Optimizing Kubernetes Costs with Karpenter
ladicle
0
180
Kubernetes: API Priority and Fairness
ladicle
1
810
FinOps! karpenterによるk8sコスト削減
ladicle
2
710
明日から使える(?)逆引きKubernetes
ladicle
2
1.3k
Recap: KubeCon+CloudNativeCon 2021 NA / Kubernetes Meetup Tokyo #47
ladicle
0
280
KubeCon+CloudNativeCon Europe 2020 Overview
ladicle
0
220
Think Design About Pretty kubectl Plugins
ladicle
0
400
Kubernetesを拡張して日々のオペレーションを自動化する
ladicle
18
7.7k
Other Decks in Technology
See All in Technology
When Windows Meets Kubernetes…
pichuang
0
310
完全自律型AIエージェントとAgentic Workflow〜ワークフロー構築という現実解
pharma_x_tech
0
350
シフトライトなテスト活動を適切に行うことで、無理な開発をせず、過剰にテストせず、顧客をビックリさせないプロダクトを作り上げているお話 #RSGT2025 / Shift Right
nihonbuson
3
2.2k
Alignment and Autonomy in Cybozu - 300人の開発組織でアラインメントと自律性を両立させるアジャイルな組織運営 / RSGT2025
ama_ch
1
2.4k
メンバーがオーナーシップを発揮しやすいチームづくり
ham0215
2
150
AWS Community Builderのススメ - みんなもCommunity Builderに応募しよう! -
smt7174
0
190
[IBM TechXchange Dojo]Watson Discoveryとwatsonx.aiでRAGを実現!座学①
siyuanzh09
0
110
RubyでKubernetesプログラミング
sat
PRO
4
160
ゼロからわかる!!AWSの構成図を書いてみようワークショップ 問題&解答解説 #デッカイギ #羽田デッカイギおつ
_mossann_t
0
1.5k
20250116_自部署内でAmazon Nova体験会をやってみた話
riz3f7
1
100
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
250
Reactフレームワークプロダクトを モバイルアプリにして、もっと便利に。 ユーザに価値を届けよう。/React Framework with Capacitor
rdlabo
0
130
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Agile that works and the tools we love
rasmusluckow
328
21k
Code Reviewing Like a Champion
maltzj
521
39k
Docker and Python
trallard
43
3.2k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
How to Ace a Technical Interview
jacobian
276
23k
Visualization
eitanlees
146
15k
4 Signs Your Business is Dying
shpigford
182
22k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
KATA
mclloyd
29
14k
Fireside Chat
paigeccino
34
3.1k
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