Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Prometheus Operator

Prometheus Operator

0b17c95bc7d94b582aa0f6e44442f381?s=128

Gavin Zhou

July 27, 2018
Tweet

Transcript

  1. Prometheus Operator Orangesys Inc.

  2. $cat whoami.yaml --- Name: Tachibana Shuji Description: Orangesys Inc. Twitter:

    @gavinzhm Medium: @gavin.zhou Dev: [go, rust] Other: [running, OSS]
  3. Orangesys Inc. • SaaS監視システムサービス ◦ Grafana、Prometheus、InflxuDB • DevOpsツール開発 ◦ Kubernetes、Containerなど

  4. Kubernetes監視標準装備

  5. Kubernetes監視標準装備

  6. Why K8s monitoring with Prometheus • Third Partyツールは積極的にPrometheus-metric-apiを対 応 ◦

    istio、traefik、sysdig、cadvisor、fluntd等
  7. Prometheus Ecosystem

  8. Kubernetes Prometheus Ecosystem 1. exporter-kube-dns 2. exporter-kubelets 3. exporter-kube-etcd 4.

    exporter-kubernetes 5. exporter-coredns 6. exporter-kube-scheduler 7. exporter-node 8. exporter-kube-controller-manager 9. Exporter-kube-state 10. ….
  9. Running Prometheus on Kubernetes 1. kubectl apply -f kubernetes-prometheus 2.

    https://github.com/coreos/prometheus-operator ※いずれに、そのまま構築できない
  10. Prometheus Operators

  11. Prometheus Operators Prometheus管理を簡単にする kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/bun dle.yaml kubectl get

    po NAME READY STATUS RESTARTS AGE prometheus-operator-56665b5fd8-s58k2 1/1 Running 0 1m
  12. Prometheus Operators

  13. Prometheus Kubernetes Prometheus Components included in this package: • The

    Prometheus Operator • Highly available Prometheus • Highly available Alertmanager • Prometheus node-exporter • kube-state-metrics • Grafana
  14. Prometheus Ecosystem yaml List

  15. Jsonnet Prometheus Kubernetes git clone https://github.com/gavinzhou/prometheus-kubernetes cd prometheus-kubernetes ./build.sh &&

    kubectl apply -f manifest ※jb、jsonnet、gojsontoyamlが必要
  16. Jsonnet Prometheus Kubernetes

  17. Jsonnet Prometheus Kubernetes

  18. Jsonnet Prometheus Kubernetes

  19. Jsonnet Prometheus Kubernetes

  20. まとめ • Prometheus OperatorはPrometheusの管理 • Helm Rbac問題があり(※Tiller-less)、kubectl apply -f <directory>

    へ • Jsonnetはyamlファイルの作成が簡単 • Prometheus-OperatorのyamlファイルをCIでテスト ※https://github.c om/gavinzhou/prometheus-kubernetes