Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
KubeConEU 2019 recap - VPA in-place update
Shunya Murata
June 18, 2019
Programming
3
2k
KubeConEU 2019 recap - VPA in-place update
Shunya Murata
June 18, 2019
Tweet
Share
More Decks by Shunya Murata
See All by Shunya Murata
Kubernetes v1.19 Updates
shmurata
3
1k
プロダクションレディを目指した Kubernetes クラスタのアップグレード戦略/Strategy to upgrade Kubernetes clusters in Production
shmurata
9
3.4k
Kubernetes上でアプリケーションを 運用するまでの道のり/The way to run applications with Kubernetes
shmurata
15
2.3k
Kubernetes Operator で実現する NoOps の世界 / How we accomplish NoOps by Kubernetes Operator.
shmurata
20
3.5k
180715-line-meetup.pdf
shmurata
3
750
ThirdPartyResource を使った Kubernetes as a Service の実装
shmurata
2
2.7k
Other Decks in Programming
See All in Programming
段階的な技術的負債の解消方法.pdf
ko2ic
2
900
Untangling Coroutine Testing (Droidcon Berlin 2022)
zsmb
1
480
Recap CDN, Edge, WebAssembly | ワインと鍋.js#1
sadnessojisan
2
1.2k
VIMRC 2022
achimnol
0
130
ストア評価「2.4」だったCOCOARアプリを1年で「4.4」になんとかした方法@Cloud CIRCUS Meetup #2
1901drama
0
180
「混ぜるな危険」を推進する設計
minodriven
8
2.5k
Atomic Design とテストの○○な話
takfjp
2
800
これからのスクラムマスターのキャリアプランの話をしよう - スクラムマスターの前に広がる世界
psj59129
0
200
2022年のモダンCSS改
tonkotsuboy_com
24
16k
20220706_Google Apps Scriptを実演で学ぶ~ GAS × Slack ~
apachan
2
620
実践 SpiceDB - クライドネイティブ時代をサバイブできるパーミッション管理の実装を目指して / Practical SpiceDB
lmt_swallow
0
120
How to Test Your Compose UI (Droidcon Berlin 2022)
stewemetal
1
130
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
319
19k
How to train your dragon (web standard)
notwaldorf
60
3.9k
Mobile First: as difficult as doing things right
swwweet
213
7.6k
Teambox: Starting and Learning
jrom
123
7.7k
A better future with KSS
kneath
226
16k
Fantastic passwords and where to find them - at NoRuKo
philnash
27
1.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
236
1.1M
A Modern Web Designer's Workflow
chriscoyier
689
180k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
11
4.8k
Rebuilding a faster, lazier Slack
samanthasiow
62
7.3k
The Invisible Side of Design
smashingmag
290
48k
Infographics Made Easy
chrislema
233
17k
Transcript
KubeConEU 2019 Recap Restart-Free Vertical Scaling for Kubernetes Pods Resize
Your Pods w/o Disruptions aka How to Have a Cake and Eat a Cake Kuberentes Meetup Tokyo #20 / June 18, 2019 Shunya Murata <shmurata@zlab.co.jp> @shmurata_
Shunya Murata/ @shmurata_ ▶ ゼットラボ株式会社 ソフトウェアエンジニア ▶ 対外的な主な取り組み + ThirdPartyResourceを使ったKubernetes
as a Serviceの実装 + Kubernetes Meetup Tokyo#3 + Kubernetes実践⼊⾨ 2
▶ アジェンダ 1. VerticalPodAutoscaler の現状 2. セッションの紹介 3. 弊社でのVPAの利⽤事例 4.
まとめ 3
VerticalPodAutoscalerの現状
▶ pod.spec.resource.requests ▶ Podが使⽤するリソース量を指定して予約 することができる + この値を元にSchedulerがいいかんじ にNodeにPodをスケジュールする ▶ この指定は多くても少なくてもダメ
5 apiVersion: apps/v1 kind: Pod spec: containers: - image: nginx name: nginx resources: requests: cpu: 100m memory: 256Mi
▶ VerticalPodAutoscaler ▶ Podの垂直スケールを⾃動的に⾏う ための仕組み + 実際のリソース利⽤率から値を計 算してresource.requestsを設定す る ▶
現在(2019/6/18時点)は v0.5.1 が最新 + beta フェーズ 6 apiVersion: autoscaling.k8s.io/v1beta2 kind: VerticalPodAutoscaler spec: targetRef: apiVersion: apps/v1 kind: Deployment name: nginx updatePolicy: updateMode: "Auto"
▶ VerticalPodAutoscalerの構成と動き 7 VPA recommender VPA updater VPA Admission Plugin
metrics server 1.collect metrics 2. update VPA status 3. watch VPA status and Pod 4. evict pod 5. update resource.requests
▶ VerticalPodAutoscalerの課題 ▶ resource.requestsの変更をする場合にPodの再起動が必要 + 再起動なしにresource.requestを変更する仕様が検討されている + in-place update 8
KubeConEU2019セッションの紹介
▶ https://static.sched.com/hosted_files/kccnceu19/31/RestartFreeVerticalScaling.pdf 10
▶ https://static.sched.com/hosted_files/kccnceu19/cf/Cake%20presentation.pdf 11
弊社での取り組み
▶ Background ▶ Kubernetes クラスタ: 200+ + クラスタごとにNode flavorや数が異なる ▶
すべてのクラスタに共通でデプロイするアドオンがある + CoreDNS, IngressController, metrics-server, Prometheus,Grafana, 13
▶ Problem ▶ アドオンのresource.requestの設定が難しい + クラスタの規模やユーザの利⽤⽅法によって必要な量が異なる + クラスタの規模についてはaddon-resizerで対応できるが… + https://github.com/kubernetes/autoscaler/tree/master/addon-resizer
14
▶ Try 15 ઃఆมߋ
▶ Feedback ▶ VerticalPodAutoscaler + resource.requests変更時に再起動が必要 + データを保持していないアドオンは問題ないがデータを保持しているアド オンが問題 +
Prometheusはローカルにデータを持っているため再起動するとメトリクス をロスト + PersistentVolumeは様々な事情によってまだ導⼊できていない + UpdateMode: Initial で回避 16
▶ in-place update のその後 ▶ Migrate Karol Golab's KEP for
in-place update of pod resources to k/ enhancements + https://github.com/kubernetes/enhancements/pull/686 17
▶ まとめ ▶ VPAの概要と現状 ▶ in-place updateの対応 ▶ 弊社でVPAを採⽤しようとしている事例 18
Fin.