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
[SRETT] とある案件で実装している外形監視基盤について
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
RyoTozawa
March 18, 2022
Technology
850
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
[SRETT] とある案件で実装している外形監視基盤について
RyoTozawa
March 18, 2022
More Decks by RyoTozawa
See All by RyoTozawa
3-shake, inc における 「Progressive Dellivery」導入までの悩みと取り組み (CNDT2021)
tozastation
1
330
結合さん作ってみた (Vegeta × Kubernetes Event Exporter)
tozastation
0
780
Other Decks in Technology
See All in Technology
“詰む”前に仕組みを作れ 〜技術の波に溺れないためのキャッチアップ術〜
takasyou
7
3.8k
Zenoh on Zephyr on LiteX
takasehideki
2
110
千葉での単身赴任からAWSをやり続け、千葉に戻ってきた話
yama3133
1
120
アラート調査向けAIエージェントの本番導入とその後/AI Agents for Alert Investigation: Production Deployment and After
taddy_919
0
140
IaC コードを資産へ:AWS CDK 社内ライブラリと横断展開 / aws-summit-japan-2026
gotok365
10
1.6k
iOS アプリの「これって不具合ですか?」を AI に調べてもらう
miichan
0
140
MySQL & MySQL HeatWave Report - June 2026
freshdaz
0
120
From Prompt Engineering to Loop Engineering
shibuiwilliam
1
220
データレイクの「見えない問題」を可視化する
sansantech
PRO
1
200
元・セキュリティ学習経験0大学生による業務紹介 / An Introduction to the Job by a Former College Student with Zero Security Training Experience
nttcom
0
150
コミットの「なぜ」を読む
ota1022
0
120
螺旋型キャリアの生存戦略 / kinoko-conf2026
rakus_dev
1
980
Featured
See All Featured
New Earth Scene 8
popppiees
3
2.4k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
How to make the Groovebox
asonas
2
2.2k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
250
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Rails Girls Zürich Keynote
gr2m
96
14k
Producing Creativity
orderedlist
PRO
348
40k
Claude Code のすすめ
schroneko
67
230k
Visualization
eitanlees
152
17k
How GitHub (no longer) Works
holman
316
150k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Transcript
とある案件で実装している外形監視基盤について
Copyrights©3-shake Inc. All Rights Reserved. 2 自己紹介 - Sreake 事業部
- 金融サービスの SRE チームにお邪魔したり - 最近はデータ活用のパイプラインやダッシュボード整備に勤しんでいます - 社内プロダクトの SRE したり - 過去登壇 - 3-shake, inc における 「Progressive Delivery」導入までの悩みと取り組み(CloudNative Days Tokyo 2021) - 結合さん作ってみた ~Vegeta × Kubernetes EventExporter~ (SRETT) - リンク - https://speakerdeck.com/tozastation - https://github.com/tozastation 戸澤 涼(@tozastation)
Copyrights©3-shake Inc. All Rights Reserved. 3 今日お話しすること 外形監視基盤 PoC の作成
with GKE AutoPilot ~ ほぼ GKE AutoPilot の話 ~
Copyrights©3-shake Inc. All Rights Reserved. 4 作りたいもの いい感じなマルチテナントな外形監視基盤
Copyrights©3-shake Inc. All Rights Reserved. 5 こんな構成で実現しています ※ テナント名は例です GKE
(Autopilot) k6 http (Sreake) k6 http (Securify) k6 http (Reckoner) k6 grpc (Relance) インターネット ArgoCD Prometheus VictoriaMetrics Blackbox Exporter (SSL) Blackbox Exporter (TCP) [構成一覧] ワークロード管理: - GKE AutoPilot - ArgoCD 外形監視: - k6 (シナリオ形式) - blackbox-exporter メトリクス: - Statsd Exporter - Prometheus - VictoriaMetrics Statsd Exporter
Copyrights©3-shake Inc. All Rights Reserved. 6 GKE AutoPilot とは 仕様
- いくつか制限が設けられている - リソースの「最小・最大」が決まっている - 未指定でデフォルト,CPU (500m) / Memory (2GiB) / Storage (1GiB) - ノードラベルの追加は不可 - Node Pool 単位でラベルを分ける運用をしていたので変えなければ・・・ - 特定の Pod と同じノードにスケジュールしたくない場合は Affinity 等で調整が必要 - topologyKey は,kubernetes.io/hostname や failure-domain.beta.kubernetes.io/zone は使えそう - kube-system は参照のみ - 一部 Helm Charts は values に注意 GKE は、ノードやノードプールなどのクラスタの基盤となるインフラストラクチャをプロビジョニングし て管理します。また、ユーザーによる操作が不要な最適化されたクラスタを提供します.
Copyrights©3-shake Inc. All Rights Reserved. 7 GKE AutoPilot とは 仕様
- リソースが足りなくスケージュールできない場合は GKEが判断してノードをスケール - CronJob 等素早くデプロイしたい場合は Priority Class が低い Pod を常駐させて,入れ替える方法がある - 利用できるノードスペックは,e2 シリーズのみ - PSP (Pod Security Policy) から GateKeeper へ - 利用している Helm Chart は,一旦 PSP Off で対応 - 移行手段検討中 - こちらのツール気になっているので検証中です - https://github.com/appvia/psp-migration GKE は、ノードやノードプールなどのクラスタの基盤となるインフラストラクチャをプロビジョニングし て管理します。また、ユーザーによる操作が不要な最適化されたクラスタを提供します.
Copyrights©3-shake Inc. All Rights Reserved. 8 GKE AutoPilot とは 仕様
- リソースが足りなくスケージュールできない場合は GKEが判断してノードをスケール - CronJob 等素早くデプロイしたい場合は Priority Class が低い Pod を常駐させて,入れ替える方法がある - 利用できるノードスペックは,e2 シリーズのみ GKE は、ノードやノードプールなどのクラスタの基盤となるインフラストラクチャをプロビジョニングし て管理します。また、ユーザーによる操作が不要な最適化されたクラスタを提供します. (公式引用) Production での利用はまだ勧められてないみたいだけど Kubernetes 周辺のエコシステムを利用しつつ 運用は楽したい方に触ってみて欲しい! 弊社では プロダクトの開発環境とジョブ基盤として活躍しています.
Copyrights©3-shake Inc. All Rights Reserved. 9 選定理由などお話しします ~ ワークロード管理 ~
GKE (Autopilot) k6 http (Sreake) k6 http (Securify) k6 http (Reckoner) k6 grpc (Relance) インターネット ArgoCD [ワークロード管理の選定理由 ] - GKE AutoPilot 技術的に興味津々(クラスタ運用からの解放) - ArgoCD 過去の案件でも重宝していたので知見も豊富. 他クラスタで動くワークロードを管理したかった. (≒ 自前で実装したくなかった ) Prometheus VictoriaMetrics Blackbox Exporter (SSL) Blackbox Exporter (TCP) Statsd Exporter
Copyrights©3-shake Inc. All Rights Reserved. 10 選定理由などお話しします ~ 外形監視 ~
GKE (Autopilot) k6 http (Sreake) k6 http (Securify) k6 http (Reckoner) k6 grpc (Relance) インターネット ArgoCD Prometheus VictoriaMetrics Blackbox Exporter (SSL) Blackbox Exporter (TCP) Statsd Exporter [外形監視の選定理由 ] - k6 シナリオベースで 複数のリクエストを組み合わせて実装したい. SRE的にいうと CUL (Critical User Journey) をもとに監視して メトリクスを収集したい. - blackbox-exporter DNS/ICMP/TCP/TLS 等の監視で利用したい
Copyrights©3-shake Inc. All Rights Reserved. 11 選定理由などお話しします ~ 外形監視 ~
GKE (Autopilot) k6 http (Sreake) k6 http (Securify) k6 http (Reckoner) k6 grpc (Relance) インターネット ArgoCD Prometheus VictoriaMetrics Blackbox Exporter (SSL) Blackbox Exporter (TCP) Statsd Exporter [外形監視の選定理由 ] - k6 シナリオベースで 複数のリクエストを組み合わせて実装したい. SRE的にいうと CUL (Critical User Journey) をもとに監視して メトリクスを収集したい. - blackbox-exporter DNS/ICMP/TCP/TLS 等の監視で利用したい CUJ (Critical User Journey) とは あるユーザーの体験の中核をなす一連のタスクのことを指し ます. SLI (メトリクス) を決める際に重要となる用語です.
Copyrights©3-shake Inc. All Rights Reserved. 12 選定理由などお話しします ~ 外形監視 ~
GKE (Autopilot) k6 http (Sreake) k6 http (Securify) k6 http (Reckoner) k6 grpc (Relance) インターネット ArgoCD Prometheus VictoriaMetrics Blackbox Exporter (SSL) Blackbox Exporter (TCP) Statsd Exporter [外形監視の選定理由 ] - k6 シナリオベースで 複数のリクエストを組み合わせて実装したい. SRE的にいうと CUL (Critical User Journey) をもとに監視して メトリクスを収集したい. - blackbox-exporter DNS//TCP/Certificate 等の監視で利用したい
Copyrights©3-shake Inc. All Rights Reserved. 13 選定理由などお話しします ~ メトリクス ~
GKE (Autopilot) k6 http (Sreake) k6 http (Securify) k6 http (Reckoner) k6 grpc (Relance) インターネット ArgoCD Prometheus VictoriaMetrics Blackbox Exporter (SSL) Blackbox Exporter (TCP) Statsd Exporter [メトリクス選定理由] Statsd Exporter k6 のメトリクスにラベルを付与するために利用 k6 × Prometheus の選択肢もあったが,メトリクスに追加のタ グを付与したいだけなのに実装が複雑であった. k6 × Statsd Exporter であれば,環境変数の追加のみでタグ の付与ができた. Prometheus (kube-prometheus-stack) メトリクス収集役.監視セットが揃っているため採用 . VictoriaMetrics (victoria-metrics-cluster) メトリクスの長期保存役 . アプリからメトリクスの検索もした い.
Copyrights©3-shake Inc. All Rights Reserved. 14 運用で考えている箇所を少し紹介 GKE (Autopilot) k6
http (Sreake) k6 http (Securify) k6 http (Reckoner) k6 grpc (Relance) インターネット ArgoCD Prometheus VictoriaMetrics Blackbox Exporter (SSL) Blackbox Exporter (TCP) Statsd Exporter [運用を考える箇所] GKE AutoPilot - スケジューリング - 新しい Pod をスケジュールするまで,数分待機 する必要がある - CronJob 等だと頻繁にスケジュールする際に厳 しい. Victoria Metrics - バックアップ - クラスタ切り替えや障害のために バックアップを取っておきたい - vmrestore/vmbackup を一旦採用. velero も検討中 セキュリティ - 外形監視 - Pod 間通信はせず外にだけ出て欲しい - Network Policy の運用 etc …
Copyrights©3-shake Inc. All Rights Reserved. 15 おしまい お世話になった資料たち •
Adding spare capacity to GKE Autopilot with balloon pods (WILLIAM DENNISS: https://wdenniss.com/gke-autopilot-spare-capacity) • Managing Network Policies for namespaces isolation on a multi-tenant Kubernetes cluster (mercari engineering: https://engineering.mercari.com/en/blog/entry/20220214-managing-network-policies/) • Autopilot の概要 (Google Cloud: https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview) • k6 (k6: https://k6.io/docs/) • Victoria Metrics (VictoriaMetrics: https://docs.victoriametrics.com/) • Modeling User Joueneys (Google SRE: https://sre.google/workbook/implementing-slos/) • Google Cloud で実践する SRE (Google SRE: https://www.slideshare.net/GoogleCloudPlatformJP/google-cloud-sre-249557085)