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
GKE Autopilotのコストを9000円/日から2000円/日へ!
Search
izumiiii
October 12, 2023
Programming
820
0
Share
GKE Autopilotのコストを9000円/日から2000円/日へ!
izumiiii
October 12, 2023
More Decks by izumiiii
See All by izumiiii
CircleCIの実行時間を大幅に短縮した話
izumiiii
0
120
スタートアップが挑むクラウドネイティブなマルチリージョン戦略
izumiiii
0
230
Multi-cluster deployment using ArgoCD x Connect Gateway
izumiiii
0
300
Other Decks in Programming
See All in Programming
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
5
4.9k
GoogleCloudとterraform完全に理解した
terisuke
1
190
Are We Really Coding 10× Faster with AI?
kohzas
0
140
Agentic UI in the Frontend: Architectures with Open Standards @JAX 2026 in Mainz
manfredsteyer
PRO
0
110
サークル参加から学ぶ、小さな事業の回し方
yuzneri
0
160
Agentic Elixir
whatyouhide
0
450
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
500
AWSはOSSをどのように 考えているのか?
akihisaikeda
0
100
AI-DLC Deep Dive
yuukiyo
9
5.6k
継続的な負荷検証を目指して
pyama86
3
1k
Programming with a DJ Controller — not vibe coding
m_seki
3
810
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
380
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
210
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Building an army of robots
kneath
306
46k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
780
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
We Are The Robots
honzajavorek
0
220
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
GraphQLとの向き合い方2022年版
quramy
50
15k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
110
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、リソースリクエストも思ったより簡単に導入することができた。 • リソースリクエストは最低設定値が決まってるので気おつけよう。
ご清聴ありがとうございました。