在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):prometheus-operator/prometheus-operator开源软件地址(OpenSource Url):https://github.com/prometheus-operator/prometheus-operator开源编程语言(OpenSource Language):Go 85.3%开源软件介绍(OpenSource Introduction):Prometheus OperatorProject status: beta Not all planned features are completed. The API, spec, status and other user facing objects may change, but in a backward compatible way. Note: Project was previously known as coreos/prometheus-operator. OverviewThe Prometheus Operator provides Kubernetes native deployment and management of Prometheus and related monitoring components. The purpose of this project is to simplify and automate the configuration of a Prometheus based monitoring stack for Kubernetes clusters. The Prometheus operator includes, but is not limited to, the following features:
For an introduction to the Prometheus Operator, see the getting started guide. Prometheus Operator vs. kube-prometheus vs. community helm chartPrometheus OperatorThe Prometheus Operator uses Kubernetes custom resources to simplify the deployment and configuration of Prometheus, Alertmanager, and related monitoring components. kube-prometheuskube-prometheus provides example configurations for a complete cluster monitoring stack based on Prometheus and the Prometheus Operator. This includes deployment of multiple Prometheus and Alertmanager instances, metrics exporters such as the node_exporter for gathering node metrics, scrape target configuration linking Prometheus to various metrics endpoints, and example alerting rules for notification of potential issues in the cluster. helm chartThe prometheus-community/kube-prometheus-stack helm chart provides a similar feature set to kube-prometheus. This chart is maintained by the Prometheus community. For more information, please see the chart's readme PrerequisitesVersion If you have an older version of Kubernetes and the Prometheus Operator running, we recommend upgrading Kubernetes first and then the Prometheus Operator. CustomResourceDefinitionsA core feature of the Prometheus Operator is to monitor the Kubernetes API server for changes to specific objects and ensure that the current Prometheus deployments match these objects. The Operator acts on the following custom resource definitions (CRDs):
The Prometheus operator automatically detects changes in the Kubernetes API server to any of the above objects, and ensures that matching deployments and configurations are kept in sync. To learn more about the CRDs introduced by the Prometheus Operator have a look at the design doc. To automate validation of your CRD configuration files see about linting. Dynamic Admission ControlTo prevent invalid Prometheus alerting and recording rules from causing failures in a deployed Prometheus instance,
an admission webhook
is provided to validate For more information on this feature, see the user guide. QuickstartNote: this quickstart does not provision an entire monitoring stack; if that is what you are looking for,
see the kube-prometheus project. If you want the whole stack,
but have already applied the To quickly try out just the Prometheus Operator inside a cluster, choose a release and run the following command: kubectl create -f bundle.yaml
To run the Operator outside of a cluster: make
scripts/run-external.sh <kubectl cluster name> RemovalTo remove the operator and Prometheus, first delete any custom resources you created in each namespace. The operator will automatically shut down and remove Prometheus and Alertmanager pods, and associated ConfigMaps. for n in $(kubectl get namespaces -o jsonpath={..metadata.name}); do
kubectl delete --all --namespace=$n prometheus,servicemonitor,podmonitor,alertmanager
done After a couple of minutes you can go ahead and remove the operator itself. kubectl delete -f bundle.yaml The operator automatically creates services in each namespace where you created a Prometheus or Alertmanager resources, and defines three custom resource definitions. You can clean these up now. for n in $(kubectl get namespaces -o jsonpath={..metadata.name}); do
kubectl delete --ignore-not-found --namespace=$n service prometheus-operated alertmanager-operated
done
kubectl delete --ignore-not-found customresourcedefinitions \
prometheuses.monitoring.coreos.com \
servicemonitors.monitoring.coreos.com \
podmonitors.monitoring.coreos.com \
alertmanagers.monitoring.coreos.com \
prometheusrules.monitoring.coreos.com DevelopmentPrerequisites
Testing
Running unit tests:
Running end-to-end tests on local kind cluster:
Running end-to-end tests on local minikube cluster:
ContributingMany files (documentation, manifests, ...) in this repository are
auto-generated. E.g.
SecurityIf you find a security vulnerability related to the Prometheus Operator, please do not report it by opening a GitHub issue, but instead please send an e-mail to the maintainers of the project found in the MAINTAINERS.md file. TroubleshootingCheck the troubleshooting documentation for common issues and frequently asked questions (FAQ). Acknowledgementsprometheus-operator organization logo was created and contributed by Bianca Cheng Costanzo. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论