{"id":13448978,"url":"https://github.com/prometheus-operator/prometheus-operator","last_synced_at":"2026-02-06T10:27:53.294Z","repository":{"id":37087792,"uuid":"68964263","full_name":"prometheus-operator/prometheus-operator","owner":"prometheus-operator","description":"Prometheus Operator creates/configures/manages Prometheus clusters atop Kubernetes","archived":false,"fork":false,"pushed_at":"2025-05-05T13:30:32.000Z","size":129765,"stargazers_count":9415,"open_issues_count":232,"forks_count":3765,"subscribers_count":143,"default_branch":"main","last_synced_at":"2025-05-05T14:08:52.416Z","etag":null,"topics":["hacktoberfest","kubernetes","monitoring","prometheus"],"latest_commit_sha":null,"homepage":"https://prometheus-operator.dev","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prometheus-operator.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":"governance.md","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-09-22T21:38:06.000Z","updated_at":"2025-05-05T12:41:21.000Z","dependencies_parsed_at":"2023-12-20T14:11:24.686Z","dependency_job_id":"a7d39798-6948-47a2-b853-af2a1e36fcd4","html_url":"https://github.com/prometheus-operator/prometheus-operator","commit_stats":{"total_commits":4368,"total_committers":706,"mean_commits":6.186968838526912,"dds":0.8772893772893773,"last_synced_commit":"95f730f7756aa253e754b6bf9d862507c3580085"},"previous_names":["coreos/prometheus-operator"],"tags_count":312,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-operator%2Fprometheus-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-operator%2Fprometheus-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-operator%2Fprometheus-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-operator%2Fprometheus-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prometheus-operator","download_url":"https://codeload.github.com/prometheus-operator/prometheus-operator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253773910,"owners_count":21962194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","kubernetes","monitoring","prometheus"],"created_at":"2024-07-31T06:00:26.869Z","updated_at":"2026-02-06T10:27:53.284Z","avatar_url":"https://github.com/prometheus-operator.png","language":"Go","readme":"# Prometheus Operator\n\n[![Build Status](https://github.com/prometheus-operator/prometheus-operator/actions/workflows/checks.yaml/badge.svg)](https://github.com/prometheus-operator/prometheus-operator/actions)\n[![Go Report Card](https://goreportcard.com/badge/prometheus-operator/prometheus-operator \"Go Report Card\")](https://goreportcard.com/report/prometheus-operator/prometheus-operator)\n[![Slack](https://img.shields.io/badge/join%20slack-%23prometheus--operator-brightgreen.svg)](https://kubernetes.slack.com)\n\n## Overview\n\nThe Prometheus Operator provides [Kubernetes](https://kubernetes.io/) native deployment and management of\n[Prometheus](https://prometheus.io/) and related monitoring components. The purpose of this project is to\nsimplify and automate the configuration of a Prometheus based monitoring stack for Kubernetes clusters.\n\nThe Prometheus operator includes, but is not limited to, the following features:\n\n* **Kubernetes Custom Resources**: Use Kubernetes custom resources to deploy and manage Prometheus, Alertmanager,\n  and related components.\n\n* **Simplified Deployment Configuration**: Configure the fundamentals of Prometheus like versions, persistence,\n  retention policies, and replicas from a native Kubernetes resource.\n\n* **Prometheus Target Configuration**: Automatically generate monitoring target configurations based\n  on familiar Kubernetes label queries; no need to learn a Prometheus specific configuration language.\n\nFor an introduction to the Prometheus Operator, see the [getting started](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/developer/getting-started.md) guide.\n\n## Project Status\n\nThe operator in itself is considered to be production ready. Please refer to the Custom Resource Definition (CRD) versions for the status of each CRD:\n\n* `monitoring.coreos.com/v1`: **stable** CRDs and API, changes are made in a backward-compatible way.\n* `monitoring.coreos.com/v1beta1`: **unstable** CRDs and API, changes can happen but the team is focused on avoiding them. We encourage usage in production for users that accept the risk of breaking changes.\n* `monitoring.coreos.com/v1alpha1`: **unstable** CRDs and API, changes can happen frequently, and we suggest avoiding its usage on mission-critical environments.\n\n## Prometheus Operator vs. kube-prometheus vs. community Helm chart\n\n### Prometheus Operator\n\nThe Prometheus Operator uses Kubernetes [custom resources](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) to simplify the deployment and configuration of Prometheus, Alertmanager, and related monitoring components.\n\n### kube-prometheus\n\n[kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) provides example configurations for a complete cluster monitoring\nstack based on Prometheus and the Prometheus Operator. This includes deployment of multiple Prometheus and Alertmanager instances,\nmetrics exporters such as the node_exporter for gathering node metrics, scrape target configuration linking Prometheus to various\nmetrics endpoints, and example alerting rules for notification of potential issues in the cluster.\n\n### Helm chart\n\nThe [prometheus-community/kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack)\nHelm chart provides a similar feature set to kube-prometheus. This chart is maintained by the Prometheus community.\nFor more information, please see the [chart's readme](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack#kube-prometheus-stack)\n\n## Prerequisites\n\nThe Prometheus Operator requires at least Kubernetes version `1.16.0`. If you\nare just starting out with the Prometheus Operator, it is highly recommended to\nuse the latest [stable\nrelease](https://github.com/prometheus-operator/prometheus-operator/releases/latest).\n\n## CustomResourceDefinitions\n\nA core feature of the Prometheus Operator is to monitor the Kubernetes API server for changes\nto specific objects and ensure that the current Prometheus deployments match these objects.\nThe Operator acts on the following [Custom Resource Definitions (CRDs)](https://kubernetes.io/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions/):\n\n* **`Prometheus`**, which defines a desired Prometheus deployment.\n\n* **`PrometheusAgent`**, which defines a desired Prometheus deployment, but running in Agent mode.\n\n* **`Alertmanager`**, which defines a desired Alertmanager deployment.\n\n* **`ThanosRuler`**, which defines a desired Thanos Ruler deployment.\n\n* **`ServiceMonitor`**, which declaratively specifies how groups of Kubernetes services should be monitored.\n  The Operator automatically generates Prometheus scrape configuration based on the current state of the objects in the API server.\n\n* **`PodMonitor`**, which declaratively specifies how group of pods should be monitored.\n  The Operator automatically generates Prometheus scrape configuration based on the current state of the objects in the API server.\n\n* **`Probe`**, which declaratively specifies how groups\n  of ingresses or static targets should be monitored. The Operator automatically generates Prometheus scrape configuration\n  based on the definition.\n\n* **`ScrapeConfig`**, which declaratively specifies scrape configurations to be added to Prometheus. This CustomResourceDefinition helps with scraping resources outside the Kubernetes cluster.\n\n* **`PrometheusRule`**, which defines a desired set of Prometheus alerting and/or recording rules.\n  The Operator generates a rule file, which can be used by Prometheus instances.\n\n* **`AlertmanagerConfig`**, which declaratively specifies subsections of the Alertmanager configuration, allowing\n  routing of alerts to custom receivers, and setting inhibit rules.\n\nThe Prometheus operator automatically detects changes in the Kubernetes API server to any of the above objects, and ensures that\nmatching deployments and configurations are kept in sync.\n\nTo learn more about the CRDs introduced by the Prometheus Operator have a look\nat the [design](https://prometheus-operator.dev/docs/getting-started/design/) page.\n\n## Dynamic Admission Control\n\nTo prevent invalid Prometheus alerting and recording rules from causing failures in a deployed Prometheus instance,\nan [admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/)\nis provided to validate `PrometheusRule` resources upon initial creation or update.\n\nFor more information on this feature, see the [user guide](https://prometheus-operator.dev/docs/platform/webhook/).\n\n## Quickstart\n\n**Note:** this quickstart does not provision an entire monitoring stack; if that is what you are looking for,\nsee the [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) project. If you want the whole stack,\nbut have already applied the `bundle.yaml`, delete the bundle first (`kubectl delete -f bundle.yaml`).\n\nTo quickly try out *just* the Prometheus Operator inside a cluster, **choose a release** and run the following command which deploys the operator in the `default` namespace:\n\n```sh\nkubectl create -f bundle.yaml\n```\n\nIf you want to deploy the Prometheus operator in a different namespace, you also need `kustomize`:\n\n```sh\nNAMESPACE=my_namespace kustomize edit set namespace $NAMESPACE \u0026\u0026 kubectl create -k .\n```\n\n\u003e Note: make sure to adapt the namespace in the ClusterRoleBinding if deploying in a namespace other than the default namespace.\n\nTo run the Operator outside of a cluster:\n\n```sh\nmake\nscripts/run-external.sh \u003ckubectl cluster name\u003e\n```\n\n## Removal\n\nTo remove the operator and Prometheus, first delete any custom resources you created in each namespace. The\noperator will automatically shut down and remove Prometheus and Alertmanager pods, and associated ConfigMaps.\n\n```sh\nfor n in $(kubectl get namespaces -o jsonpath={..metadata.name}); do\n  kubectl delete --all --namespace=$n prometheus,servicemonitor,podmonitor,alertmanager\ndone\n```\n\nAfter a couple of minutes you can go ahead and remove the operator itself.\n\n```sh\nkubectl delete -f bundle.yaml\n```\n\nThe operator automatically creates services in each namespace where you created a Prometheus or Alertmanager resources,\nand defines three custom resource definitions. You can clean these up now.\n\n```sh\nfor n in $(kubectl get namespaces -o jsonpath={..metadata.name}); do\n  kubectl delete --ignore-not-found --namespace=$n service prometheus-operated alertmanager-operated\ndone\n\nkubectl delete --ignore-not-found customresourcedefinitions \\\n  prometheuses.monitoring.coreos.com \\\n  servicemonitors.monitoring.coreos.com \\\n  podmonitors.monitoring.coreos.com \\\n  alertmanagers.monitoring.coreos.com \\\n  prometheusrules.monitoring.coreos.com \\\n  alertmanagerconfigs.monitoring.coreos.com \\\n  scrapeconfigs.monitoring.coreos.com\n```\n\n## Testing\n\nSee [TESTING](TESTING.md)\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md).\n\n## AI Usage Policy\n\nSee [AI Usage Policy](CONTRIBUTING.md#ai-use-policy) in our Contributing guidelines for information on using AI tools when contributing to the project.\n\n## Security\n\nIf you find a security vulnerability related to the Prometheus Operator which\nisn't already publicly disclosed, please do not report it by opening a GitHub\nissue, but instead please send an e-mail to the maintainers of the project\nfound in the [MAINTAINERS.md](MAINTAINERS.md) file.\n\nPlease refer to the [Prometheus\ndocumentation](https://prometheus.io/docs/operating/security/#automated-security-scanners)\nwhen reporting issues from automated security scanners.\n\n## Troubleshooting\n\nCheck the [troubleshooting documentation](Documentation/platform/troubleshooting.md) for\ncommon issues and frequently asked questions (FAQ).\n\n## Acknowledgements\n\nprometheus-operator organization logo was created and contributed by [Bianca Cheng Costanzo](https://github.com/bia).\n","funding_links":[],"categories":["Go","Kubernetes Monitoring","HarmonyOS","prometheus","operator候选列表","monitoring","Operators"],"sub_categories":["Tools","Windows Manager","部署类型"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprometheus-operator%2Fprometheus-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprometheus-operator%2Fprometheus-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprometheus-operator%2Fprometheus-operator/lists"}