Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
GKE Autopilotのコストを9000円/日から2000円/日へ!
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
izumiiii
October 12, 2023
Programming
860
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GKE Autopilotのコストを9000円/日から2000円/日へ!
izumiiii
October 12, 2023
More Decks by izumiiii
See All by izumiiii
CircleCIの実行時間を大幅に短縮した話
izumiiii
0
130
スタートアップが挑むクラウドネイティブなマルチリージョン戦略
izumiiii
0
240
Multi-cluster deployment using ArgoCD x Connect Gateway
izumiiii
0
320
Other Decks in Programming
See All in Programming
最近”作らせてる” ローカルAIアプリの話
akit37
0
440
The Rails Doctrine Decade
koic
2
560
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
160
速習iPhone Duo対応
yuukiw00w
2
980
wkhtmltopdfの次どうするか問題2026
willnet
2
1.9k
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
650
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.7k
golang-bob.pdf
iwatsukayura
0
120
R8 の設定見直しでアプリサイズ削減
andpad
0
210
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
610
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
3
4.3k
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
370
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
340
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
350
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
My Coaching Mixtape
mlcsv
0
350
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
860
A Tale of Four Properties
chriscoyier
163
24k
Raft: Consensus for Rubyists
vanstee
142
7.7k
Fireside Chat
paigeccino
43
4.1k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
Writing Fast Ruby
sferik
630
63k
Skip the Path - Find Your Career Trail
mkilby
1
250
Transcript
GKE Autopilotのコストを9000円/日から2000円/日へ! 3-shake SRE Tech Talk #7
自己紹介 名前 Koizumi Fumiya Twitter izumiiii @izumiiii9 Blog https://izumiiii.com Zenn
https://zenn.dev/izumiiii 会社 株式会社Resilire 普段していること インフラ業務メインで、最近はよくKubernetesを触っています。
提供プロダクト Resilreの提供価値と機能 3 サプライチェーンリスク管理SaaS Resilire サプライチェーン全体(社内拠点や委託先、原料 調達先)をツリー上で構造的に管理。災害時、被 災影響の可能性がある拠点をマップ上で可視化・ リスト化。リストの拠点に自動でアンケート配信か ら回答結果のレポート生成を可能にするプロダク
トを提供しています。 3
突然ですが、Resilireではマルチクラスタで運用しています。 Tokyo Osaka
マルチクラスタによる費用がかかりすぎてる! 9000円/日
なんとかしないと!
Spot Pod for Autopilot vCPU, Memory当たり1/3程度の料金で使える。 注意点: 標準の Pod の実行でコンピューティングリソースが必要になると、GKE
に よって強制削除される場合がある。
出典: https://cloud.google.com/kubernetes-engine/pricing?hl=ja#autopilot_mode
apiVersion: apps/v1 kind: Deployment metadata: name: argocd-repo-server spec: template: spec:
containers: - name: argocd-repo-server nodeSelector: cloud.google.com/gke-spot: 'true' terminationGracePeriodSeconds: 25 設定例
リソースリクエスト Autopilotでのノードのインスタンスタイプ/ノード数は実際にクラスタにデプロイ されているPodに設定されたRequest量をもとに決定されている。 明示的にリソース量をマニフェストで指定していない場合、1コンテナあたり 0.5 vCPU, 2GiB Memoryが割り当てられる。
出典: https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-resource-r equests?hl=ja#compute-class-defaults
修正作業 • node数を確認する(kubectl get nodes) • 実態のメモリ使用状況を確認する(kubectl top pod) •
コードを修正する
修正作業② 実態に合わせてマニフェストを修正していく apiVersion: apps/v1 kind: Deployment metadata: name: argocd-repo-server spec:
template: spec: containers: - name: argocd-repo-server resources: requests: cpu: 250m memory: 512Mi
注意点 Autopilotでは1Podあたり最低 CPU: 250m メモリ: 0.5 GiB を割り当てないといけない。 それより小さい値を指定していても、値が変わらないようになっている。
対応した結果...
2000/日まで減らすことに成功!
まとめ • 開発初期段階から節約対策できるようにしましょう。 • Spot Pod for Autopilot、リソースリクエストも思ったより簡単に導入することができた。 • リソースリクエストは最低設定値が決まってるので気おつけよう。
ご清聴ありがとうございました。