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
オンプレ Kubernetes クラスタの全サーバーを宣言的に再起動する方法
Search
Daichi Sakaue
January 21, 2021
Programming
1.6k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
オンプレ Kubernetes クラスタの全サーバーを宣言的に再起動する方法
Daichi Sakaue
January 21, 2021
Other Decks in Programming
See All in Programming
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
150
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
380
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
330
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
120
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.2k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
390
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
270
Webの地図
yosuke_furukawa
PRO
6
5k
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
110
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
370
iOSDCのペンライトを自動制御したい!
akkeylab
0
330
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
570
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
510
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
A Modern Web Designer's Workflow
chriscoyier
699
190k
The Pragmatic Product Professional
lauravandoore
37
7.5k
A Tale of Four Properties
chriscoyier
163
24k
Believing is Seeing
oripsolob
1
240
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
260
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Discover your Explorer Soul
emna__ayadi
2
1.3k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Between Models and Reality
mayunak
4
480
Transcript
オンプレ Kubernetes クラスタの全サーバーを 宣⾔的に再起動する⽅法 2021/01/21 yokaze (Cybozu, Inc.)
⾃⼰紹介 ▌@yokaze l Cybozu l Kubernetes クラスタの運⽤ ▌今⽇の内容は技術ブログのダイジェスト版 l 詳細に興味がある⽅は
https://blog.cybozu.io/entry/2020/12/25/134334
Kubernetes クラスタの全ノードを再起動したい ▌⽬的 l ファームウェア更新 l 多くの場合、更新後に再起動が必要 l セキュリティ対応 l
アプリの耐障害性の確認 l カオスエンジニアリング ▌条件 l クラスタ上で動いているサービスを⽌めない l ⼿作業で複雑なオペレーションをしない
簡単な⽅法 ▌サービスのバックエンドは冗⻑化されているので Pod を 1 個消しても動く ようになっている ▌ノード 1 を再起動(終わるまで待つ)
▌ノード 2 を再起動(終わるまで待つ) ▌… ▌⼿でやると永遠に終わらない
簡単な⽅法 ▌サービスのバックエンドは冗⻑化されているので Pod を 1 個消しても動く ようになっている ▌ノード 1 を再起動(終わるまで待つ)
▌ノード 2 を再起動(終わるまで待つ) ▌… ▌⼿でやると永遠に終わらない
簡単な⽅法 ▌サービスのバックエンドは冗⻑化されているので Pod を 1 個消しても動く ようになっている ▌ノード 1 を再起動(終わるまで待つ)
▌ノード 2 を再起動(終わるまで待つ) ▌… ▌⼿でやると永遠に終わらない
簡単な⽅法 ▌サービスのバックエンドは冗⻑化されているので Pod を 1 個消しても動く ようになっている ▌ノード 1 を再起動(終わるまで待つ)
▌ノード 2 を再起動(終わるまで待つ) ▌… ▌⼿でやると永遠に終わらない
実装した⽅法 ▌クラスタ管理ツール (CKE) に再起動待ちキューを実装する ▌「再起動待ちキューに全てのノードを追加するコマンド」を作る ▌トラブル発⽣時はアラートを発⽕させる l ⼈⼿で進捗を確認しなくてよい l コマンド⼊⼒後、⼈間が即座に解放される
Kubernetes クラスタ
その他注意点 ▌サービスを壊さないよう PodDisruptionBudget と Eviction API を 活⽤する l Pod
が Eviction できない場合は時間をおいてリトライする l ⼀定時間経つとアラートも鳴る ▌多少再起動に失敗したサーバーがあっても動作を続ける l アラートは鳴る ▌⼀時停⽌ボタンを付けておく
そもそもどうして⼀台ずつ再起動するのか ▌適当に複数台選ぶと運悪く特定 サービスの Pod が集中することが ある
そもそもどうして⼀台ずつ再起動するのか ▌適当に複数台選ぶと運悪く特定 サービスの Pod が集中することが ある ▌ノードをグループ分けしておき、 Pod に anti-affinity
を付けて 分散させる ▌ノード数が超多い時はこういった 対策をする必要がある