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
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
270
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
190
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
470
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
3
190
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
B2B SaaS × AI機能開発 〜テナント分離のパターン解説〜 / B2B SaaS x AI function development - Explanation of tenant separation pattern
oztick139
2
220
複雑なState管理からの脱却
sansantech
PRO
1
140
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
120
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Building Applications with DynamoDB
mza
90
6.1k
A Tale of Four Properties
chriscoyier
156
23k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Building Your Own Lightsaber
phodgson
103
6.1k
Gamification - CAS2011
davidbonilla
80
5k
Making Projects Easy
brettharned
115
5.9k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Side Projects
sachag
452
42k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
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