在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):prometheus-operator/kube-prometheus开源软件地址(OpenSource Url):https://github.com/prometheus-operator/kube-prometheus开源编程语言(OpenSource Language):Jsonnet 86.1%开源软件介绍(OpenSource Introduction):kube-prometheus
This repository collects Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator. The content of this project is written in jsonnet. This project could both be described as a package as well as a library. Components included in this package:
This stack is meant for cluster monitoring, so it is pre-configured to collect metrics from all Kubernetes components. In addition to that it delivers a default set of dashboards and alerting rules. Many of the useful dashboards and alerts come from the kubernetes-mixin project, similar to this project it provides composable jsonnet as a library for users to customize to their needs. PrerequisitesYou will need a Kubernetes cluster, that's it! By default it is assumed, that the kubelet uses token authentication and authorization, as otherwise Prometheus needs a client certificate, which gives it full access to the kubelet, rather than just the metrics. Token authentication and authorization allows more fine grained and easier access control. This means the kubelet configuration must contain these flags:
This stack provides resource metrics by deploying the Prometheus Adapter. This adapter is an Extension API Server and Kubernetes needs to be have this feature enabled, otherwise the adapter has no effect, but is still deployed. CompatibilityThe following Kubernetes versions are supported and work as we test against these versions in their respective branches. But note that other versions might work!
Quickstart
This project is intended to be used as a library (i.e. the intent is not for you to create your own modified copy of this repository). Though for a quickstart a compiled version of the Kubernetes manifests generated with this library (specifically with
# Create the namespace and CRDs, and then wait for them to be available before creating the remaining resources
kubectl apply --server-side -f manifests/setup
until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done
kubectl apply -f manifests/ We create the namespace and CustomResourceDefinitions first to avoid race conditions when deploying the monitoring components.
Alternatively, the resources in both folders can be applied with a single command
kubectl delete --ignore-not-found=true -f manifests/ -f manifests/setup minikubeTo try out this stack, start minikube with the following command: $ minikube delete && minikube start --kubernetes-version=v1.23.0 --memory=6g --bootstrapper=kubeadm --extra-config=kubelet.authentication-token-webhook=true --extra-config=kubelet.authorization-mode=Webhook --extra-config=scheduler.bind-address=0.0.0.0 --extra-config=controller-manager.bind-address=0.0.0.0 The kube-prometheus stack includes a resource metrics API server, so the metrics-server addon is not necessary. Ensure the metrics-server addon is disabled on minikube: $ minikube addons disable metrics-server Getting startedBefore deploying kube-prometheus in a production environment, read:
Documentation
ContributingTo contribute to kube-prometheus, refer to Contributing. Join the discussionIf you have any questions or feedback regarding kube-prometheus, join the kube-prometheus discussion. Alternatively, consider joining the kubernetes slack #prometheus-operator channel or project's bi-weekly Contributor Office Hours. LicenseApache License 2.0, see LICENSE. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论