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
[SRETT] とある案件で実装している外形監視基盤について
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
RyoTozawa
March 18, 2022
Technology
870
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
350
結合さん作ってみた (Vegeta × Kubernetes Event Exporter)
tozastation
0
790
Other Decks in Technology
See All in Technology
株式会社シーエーシー エンジニア向け会社紹介資料
cac
0
57k
Minecraft JavaのMODをSwiftで作る
1mash0
0
170
絵ではじめるKubernetesセキュリティ
aoi1
4
650
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
5
25k
What the customer really needed
kawaguti
PRO
3
200
Reactの設計論
uhyo
24
13k
AI に書かせたその API、 “信頼” できますか?
nagix
0
120
EventBridge に「合流」はない ― サーバーレスのワークフローを育てるということ / No Join in EventBridge
yusukeshimizu
2
110
作品が生態系になった ─ Mini Tokyo 3D から世界へ
nagix
0
190
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
3
1.7k
作って終わりじゃないサーバーレス 〜9年運用する大規模EC物流API基盤の設計・運用のリアル〜
zozotech
PRO
0
130
Goodbye ShellScript, Hello File-based App
shunsock
0
150
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Producing Creativity
orderedlist
PRO
348
41k
sira's awesome portfolio website redesign presentation
elsirapls
0
410
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
610
Product Roadmaps are Hard
iamctodd
55
13k
Accessibility Awareness
sabderemane
1
210
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.1k
Side Projects
sachag
456
43k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
420
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
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)