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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Atsushi Tanaka
October 12, 2023
Technology
1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
取っていてよかった Kubernetes のバックアップ
3-shake SRE Tech Talk #7
https://3-shake.connpass.com/event/293432/
で発表した LT の資料です
Atsushi Tanaka
October 12, 2023
More Decks by Atsushi Tanaka
See All by Atsushi Tanaka
継続的なAIコスト最適化
bgpat
1
440
プロダクト専任SREを置かずに 信頼性を追求する
bgpat
1
170
OpenCensusと歩んだ7年間
bgpat
0
800
SREだけど社内営業組織の業務改善をしてみた
bgpat
0
1k
ウォンテッドリーにおける Platform Engineering
bgpat
0
930
Wantedly での Datadog 活用事例
bgpat
2
6.5k
KubernetesでDatadogを飼うならオートディスカバリーを使わないと損
bgpat
2
1.2k
マイクロサービス基盤にフルマネージドサービスではなくKubernetesを選択する理由
bgpat
12
4.8k
400万ユーザーに価値を届けるエンジニアを を支えるインフラ基盤
bgpat
3
590
Other Decks in Technology
See All in Technology
現場を動かすAIエージェント#2_製造業現場でのAI活用から見た、ハマる罠と実践知
kintotechdev
2
140
2026 Apache Flink Community Checkpoint
rmetzger
0
150
続・ソフトウェアアーキテクトのための意思決定術: Decision Readiness, Revisited — When AI Changes the Economics of Software Architecture
snoozer05
PRO
5
1.3k
"AWSはちょっと苦手"でも大丈夫。AWS Blocks で手軽に作る Flutter のバックエンド #FlutterKaigi
tacck
PRO
0
140
IBC 2026 動画技術関連レポート / IBC 2026 Report
cyberagentdevelopers
PRO
2
170
re:Invent の去年のスケジュールを公開します!
miu_crescent
PRO
0
280
The future of architectural work
ufried
0
150
バックオフィスに染み出すTypeScript ── clasp で安全に仕組みを作る
nealle
1
180
Lint の層を組み直した話
bengo4com
3
310
増え続けるプロダクトの品質をどう担保するか。ProductSpecとTypeScriptによる取り組み
joere
3
380
コードレビューをなくして見えたもの
henteko
0
130
AI AgentによるEmbedded SREの取り組み
tgidgd
1
340
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Optimising Largest Contentful Paint
csswizardry
37
4k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
790
Ethics towards AI in product and experience design
skipperchong
2
460
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Making the Leap to Tech Lead
cromwellryan
135
10k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
830
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
350
Odyssey Design
rkendrick25
PRO
2
920
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Paper Plane
katiecoart
PRO
5
54k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Transcript
© 2023 Wantedly, Inc. 取っていてよかった Kubernetes のバックアップ 3-shake SRE Tech
Talk #7 LT Oct. 12 2023 - Atsushi Tanaka @bgpat
© 2023 Wantedly, Inc. 自己紹介 https://www.wantedly.com/id/bgpat
© 2023 Wantedly, Inc. Kubernetes の バックアップは取っていますか?
© 2023 Wantedly, Inc. Kubernetes Resource の バックアップは取っていますか?
© 2023 Wantedly, Inc. バックアップがあって 助かった話をします
© 2023 Wantedly, Inc. トラブルシューティングの実例
© 2023 Wantedly, Inc. 問題発生 Cluster Addon のアップグレードをしたら Pod が起動しなくなった
© 2023 Wantedly, Inc. 前提となる構成 • Argo CD で k8s
manifest を Apply • Secret は直接手動で設定 • Velero で30分毎にリソースのバックアップを取得 ◦ 取得したバックアップは Amazon S3 にアップロード
© 2023 Wantedly, Inc. 問題発生 Cluster Addon のアップグレードをしたら Pod が起動しなくなった
© 2023 Wantedly, Inc. とりあえず変更を元に戻す アップデートが原因なら戻せば直るはず 結果は revert してもエラーのまま
© 2023 Wantedly, Inc. 状況確認 Pod のエラーメッセージ 「Secret に入っている環境変数がないよ」 アップデート内容に
Secret を消す変更はない Pod に Secret の Delete 権限はない
© 2023 Wantedly, Inc. エラーの考察 「Secret に入れていたはずの環境変数がない」というエラー • Pod の
env に secretRef は設定されている? → ある • Secret は存在する? → ある • Secret の data は存在する? → ない
© 2023 Wantedly, Inc. バックアップからリストアする バックアップを取っていたことを思い出す リストアを実行して Secret が戻ったことを確認 Pod
を rollout restart して復旧
© 2023 Wantedly, Inc. まとめ
© 2023 Wantedly, Inc. まとめ • バックアップを取っておくと安心 • Argo CD
を利用しても壊れることはある
© 2023 Wantedly, Inc. リストア時に困ったこと/気をつけること • 既存のリソースがリストアできない ◦ デフォルト設定では既存リソースがあるとスキップする ◦
--existing-resource-policy update をつければ上書きできる • リストアしても Argo CD に戻されてしまう ◦ Argo CD の管理対象リソースは source の状態に戻そうとする ◦ リストアする前に syncPolicy を消しておく • リストアコマンドが思い出せない ◦ 普段使わないコマンドは忘れがち
© 2023 Wantedly, Inc. (参考) Velero のインストール方法 • 公式が公開している Helm
Chart を使う ◦ https://vmware-tanzu.github.io/helm-charts/ ◦ configuration.backupStorageLocation と schedules を指定するだけで 自動バックアップも簡単に設定できる • 別途 provider のための設定が必要 ◦ AWS の場合は S3 Bucket の作成とアクセスするための IAM 設定が必要
© 2023 Wantedly, Inc. (参考) Velero のバックアップ容量 Wantedly のバックアップ総量は1TBに満たない •
2019年から30分毎に取る運用 • 今のクラスタの状態 ◦ 500 Namespaces ◦ 8,000 Pods • PersistentVolume のバックアップは含んでいない • 全てフルバックアップで取得
© 2023 Wantedly, Inc. https://www.wantedly.com/projects/522096