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
KubeConEU 2019 recap - VPA in-place update
Search
Shunya Murata
June 18, 2019
Programming
3
2.4k
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
1.2k
プロダクションレディを目指した Kubernetes クラスタのアップグレード戦略/Strategy to upgrade Kubernetes clusters in Production
shmurata
9
4.2k
Kubernetes上でアプリケーションを 運用するまでの道のり/The way to run applications with Kubernetes
shmurata
15
2.8k
Kubernetes Operator で実現する NoOps の世界 / How we accomplish NoOps by Kubernetes Operator.
shmurata
20
4k
180715-line-meetup.pdf
shmurata
3
1k
ThirdPartyResource を使った Kubernetes as a Service の実装
shmurata
2
3.2k
Other Decks in Programming
See All in Programming
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
150
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
250
昭和の職場からアジャイルの世界へ
kumagoro95
1
400
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
220
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
810
SpringBoot3.4の構造化ログ #kanjava
irof
3
1k
Grafana Cloudとソラカメ
devoc
0
180
color-scheme: light dark; を完全に理解する
uhyo
6
460
Unity Android XR入門
sakutama_11
0
170
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
1
440
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
130
DROBEの生成AI活用事例 with AWS
ippey
0
140
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
52k
RailsConf 2023
tenderlove
29
1k
Automating Front-end Workflow
addyosmani
1368
200k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
How to Ace a Technical Interview
jacobian
276
23k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
KATA
mclloyd
29
14k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
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 <
[email protected]
> @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.