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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
RyoTozawa
March 18, 2022
Technology
860
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
340
結合さん作ってみた (Vegeta × Kubernetes Event Exporter)
tozastation
0
790
Other Decks in Technology
See All in Technology
え?フロントエンドエンジニアの ワイがインフラも!?
puku0x
1
440
【CEDEC2026】グラフィックスエンジニアのためのニューラルシェーディング入門
cygames
PRO
0
130
事業価値と Engineering 2026年度版
recruitengineers
PRO
45
22k
制約理論(ToC)入門 2026版
recruitengineers
PRO
7
2.1k
新しい SLO が良い感じにハマっている話
z63d
5
2.1k
【CEDEC2026】『Relink』を拡張せよ - 『GRANBLUE FANTASY: Relink - Endless Ragnarok』の開発速度と品質を守るCI運用
cygames
PRO
0
140
個人OSSが、机の上から世界に広がるまでの話
shinyasaita
1
370
ガバメント AI 源内を地方自治体は活用できるのか可能性と課題、期待について
takeda_h
1
370
【CEDEC2026】『ウマ娘 プリティーダービー』 英語版のキャラクターの方言や口調をローカライズするための創造的アプローチ
cygames
PRO
1
200
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
6.8k
20260608_Codexの可能性_ノンプログラマー向け_大城追記
doradora09
PRO
0
780
強化学習「理論」入門
enakai00
3
3.6k
Featured
See All Featured
Design in an AI World
tapps
1
280
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
500
We Have a Design System, Now What?
morganepeng
55
8.3k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
260
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
270
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)