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
Survey and Short Dive Prometheus Operator
Search
nwiizo
May 28, 2020
Programming
2
2.5k
Survey and Short Dive Prometheus Operator
Prometheus Meetup Tokyo #4
https://prometheus.connpass.com/event/175547/
nwiizo
May 28, 2020
Tweet
Share
More Decks by nwiizo
See All by nwiizo
インフラをつくるとはどういうことなのか、 あるいはPlatform Engineeringについて
nwiizo
6
3k
Platform Engineeringは自由のめまい
nwiizo
4
2.2k
Site Reliability Engineering on Kubernetes
nwiizo
6
5.1k
メインテーマはKubernetes
nwiizo
2
460
SREの前に
nwiizo
12
3.6k
2024年版 運用者たちのLLM
nwiizo
5
1k
Platform Engineering と SRE の門
nwiizo
17
6.1k
運用者の各領域で向き合うLLM
nwiizo
1
520
可観測性ガイダンス
nwiizo
14
3.9k
Other Decks in Programming
See All in Programming
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
140
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
240
ナレッジイネイブリングにAIを活用してみる ゆるSRE勉強会 #9
nealle
0
130
Better Code Design in PHP
afilina
0
160
DRFを少しずつ オニオンアーキテクチャに寄せていく DjangoCongress JP 2025
nealle
2
210
GAEログのコスト削減
mot_techtalk
0
120
ARA Ansible for the teams
kksat
0
170
SwiftUI Viewの責務分離
elmetal
PRO
2
260
.NET Frameworkでも汎用ホストが使いたい!
tomokusaba
0
190
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
210
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
1
210
Jakarta EE meets AI
ivargrimstad
0
140
Featured
See All Featured
Site-Speed That Sticks
csswizardry
4
400
Side Projects
sachag
452
42k
Faster Mobile Websites
deanohume
306
31k
A designer walks into a library…
pauljervisheath
205
24k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
How GitHub (no longer) Works
holman
314
140k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
52k
Agile that works and the tools we love
rasmusluckow
328
21k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Transcript
None
None
• • •
None
None
⚫ ⚫ ⚫ https://github.com/cncf/toc/blob/master/DEFINITION.md 最近日本語が登場したので差し替えます. ありがとう @yokawasa さん
⚫ ⚫ ⚫ https://github.com/cncf/toc/blob/master/DEFINITION.md 最近日本語が登場したので差し替えます. ありがとう @yokawasa さん
• • • • 高度に発達したシステムの異常は神の怒りと見分けがつかない / IPSJ-ONE 2017 y_uuki https://speakerdeck.com/yuukit/ipsj-one-2017-y-uuki
O‘Reilly『Infrastructure as Code』より
⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫ Grafana Labs
at KubeCon: What is the Future of Observability? https://grafana.com/blog/2019/05/27/grafana-labs-at-kubecon-what-is-the-future-of-observability/
⚫ ⚫ ⚫ Grafana Labs at KubeCon: What is the
Future of Observability? https://grafana.com/blog/2019/05/27/grafana-labs-at-kubecon-what-is-the-future-of-observability/
⚫ ⚫ ⚫ ⚫ ダッシュボード 通知 設定 時系列 データベース タスク管理
観測 データ収集 データ利用 メール チャット
⚫ ⚫ ダッシュボード 通知 時系列 データベース タスク管理 観測 データ収集 データ利用
メール チャット
⚫ ⚫ 参考資料 https://microservices.io/patterns/service-registry.html https://microservices.io/ ⚫ ⚫ 後述するPromerrheus では…
• • •
None
⚫ ⚫ ⚫ ⚫
⚫ ⚫ ⚫ ⚫ ⚫
⚫ ⚫ ⚫ https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/
https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/ ⚫ ⚫ ⚫ ⚫
⚫ ⚫ ⚫ https://coreos.com/blog/introducing-operators.html https://operatorhub.io/
実践入門Kubernetes カスタムコントローラへの道 Programming Kubernetes: Developing Cloud-Native Applications
https://prometheus.io/docs/introduction/overview/ OVERVIEW
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config
⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫
⚫ ⚫ OpenShift Monitoring - 自律化したPrometheus運用 -
⚫ https://github.com/coreos/prometheus-operator
インスタンス管理 ⚫ Prometheusデプ ロイメントを定義。 リソース定義に一 致するデプロイメ ントが常に実行さ れていることを確 認。 インスタンス管理
Alertmanagerデプ ロイメントを定義。 リソース定義に一 致するデプロイメ ントが常に実行さ れていることを確 認 ルール設定 Prometheusルー ルファイルを定義。 このファイルは、 アラートおよび記 録ルールを含む Prometheusのイ ンスタンスに ロード。 取得対象設定 サービスのグルー プを監視する方法 を宣言的に指定。 定義に基づいて Prometheus設定 ファイルの構成を 自動的に生成 取得対象設定 ポッドのグループ を監視する方法を 宣言的に指定。 定義に基づいて Prometheus設定 ファイルの構成を 自動的に生成
• • •
None
⚫ ⚫ ⚫ https://argoproj.github.io/argo-cd/
⚫ ⚫ ⚫ https://www.weave.works/technologies/gitops/
似たような環境のものが100サイト • • •
似たような環境のものが100サイト ⚫ ⚫ ⚫ ⚫
⚫ ⚫ ⚫ ⚫ ⚫
⚫ ⚫ ⚫ ⚫ ⚫ ArgoCD で同じく扱える Helmと悩んだが学習コストが少なくて済むメリットが多かった為 採用
⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫
⚫
kube repo base 各サイト develop production
kube repo base 各サイト develop production resources: # 標準の秘密情報が載ってる -
secret.yaml # 何もデプロイされてない時の為のぺージ表示など - deployment.yaml # 80,443 サービスについて記載されている - service.yaml # 80,443 へのServiceMonitorと prometheusRule が記載 # endpoint の監視だけが監視として追加される。 - prometheusRule.yaml # commonLabelsや Annotations など
kube repo base 各サイト develop production resources: # 標準の秘密情報が載ってる -
secret.yaml # 何もデプロイされてない時の為のぺージ表示など - deployment.yaml # 80,443 サービスについて記載されている - service.yaml # 80,443 へのServiceMonitorと prometheusRule が記載 # endpoint の監視だけが監視として追加される。 - prometheusRule.yaml # commonLabelsや Annotations など ⚫
kube repo base 各サイト develop production resources: # 標準の秘密情報が載ってる -
secret.yaml # 何もデプロイされてない時の為のぺージ表示など - deployment.yaml # 80,443 サービスについて記載されている - service.yaml # 80,443 へのServiceMonitorと prometheusRule が記載 # endpoint の監視だけが監視として追加される。 - prometheusrule.yaml # commonLabelsや Annotations など ⚫
kube repo base 各サイト develop production # baseとなるkustomization.yamlを含むディレクトリ bases: -
../base # リソース名のprefix nameSuffix: "-*-gmo-jp" # patchを当てるためのファイルを指定する patches: - ./deployment.yaml # アクセス情報などは分離しておくと便利が良い resources: - ./ingress.yaml
kube repo base 各サイト develop production # baseとなるkustomization.yamlを含むディレクトリ bases: -
../base # リソース名のprefix nameSuffix: "-*-gmo-jp" # patchを当てるためのファイルを指定する patches: - ./deployment.yaml # アクセス情報などは分離しておくと便利が良い resources: - ./ingress.yaml ⚫
app repo Check app repo container repo Deploy 既存 検証環境による確認
pull req 自動生成 ※1 tag:dev kubernetes repo kustomize generate tag:dev dev.<domain> tag:prd push ※1 kustomize generate prd kube repo
⚫ ⚫ ⚫ ⚫ additionalScrapeConfigs https://github.com/coreos/prometheus-operator/blob/master/Documentation/additional-scrape-config.md additionalAlertManagerConfigs
⚫ ⚫ ⚫ ⚫
None