{"id":13463811,"url":"https://github.com/grobie/prometheus-on-kubernetes","last_synced_at":"2025-04-10T01:33:14.683Z","repository":{"id":66529111,"uuid":"72817130","full_name":"grobie/prometheus-on-kubernetes","owner":"grobie","description":"Example steps to run Prometheus in Kubernetes and scrape the infrastructure and apps","archived":false,"fork":false,"pushed_at":"2016-11-04T17:47:40.000Z","size":31,"stargazers_count":12,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-01T21:05:43.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grobie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-11-04T05:29:43.000Z","updated_at":"2023-07-25T14:05:15.000Z","dependencies_parsed_at":"2023-03-15T19:01:25.007Z","dependency_job_id":null,"html_url":"https://github.com/grobie/prometheus-on-kubernetes","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grobie%2Fprometheus-on-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grobie%2Fprometheus-on-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grobie%2Fprometheus-on-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grobie%2Fprometheus-on-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grobie","download_url":"https://codeload.github.com/grobie/prometheus-on-kubernetes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140626,"owners_count":21054323,"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":[],"created_at":"2024-07-31T14:00:28.867Z","updated_at":"2025-04-10T01:33:14.662Z","avatar_url":"https://github.com/grobie.png","language":"Shell","funding_links":[],"categories":["Performance"],"sub_categories":[],"readme":"# Prometheus on Kubernetes\n\nAn example setup of Prometheus inside of Kubernetes, monitoring the Kubernetes\ninfrastructure itself as well as services running in Kubernetes. Used during a\nworkshop at [ContainerDays NYC][].\n\nThe setup and all manifests are copied from [CoreOS][]' [kube-prometheus][]\nproject. This repository split their project up in individual commits to show\nthe individual steps.\n\n## Preparation\n\nThe examples require a running Kubernetes cluster as well as a configured\n`kubectl` to talk to that cluster. Check the Kubernetes documentation for\nexamples.\n\nIf you don't have access to a Kubernetes cluster, you can use the [bootkube][]\nor [minikube][] projects to start a cluster locally. Bootkube allows for a local\nmulti-node setup and easier monitoring of Kubernetes components.\n\nYou should be able to run `kubectl get pods --all-namespaces` and see some\noutput:\n\n```bash\n$ kubectl get pods --all-namespaces\nNAMESPACE     NAME                                      READY     STATUS    RESTARTS   AGE\nkube-system   kube-api-checkpoint-172.17.4.101          1/1       Running   0          35m\nkube-system   kube-apiserver-lpd8d                      2/2       Running   0          37m\nkube-system   kube-controller-manager-325405546-3ygeg   1/1       Running   0          39m\nkube-system   kube-controller-manager-325405546-an3m0   1/1       Running   0          39m\nkube-system   kube-dns-v20-3531996453-vkxnp             3/3       Running   0          39m\nkube-system   kube-proxy-ks0u7                          1/1       Running   0          37m\nkube-system   kube-proxy-zss6m                          1/1       Running   0          17m\nkube-system   kube-scheduler-928627977-2mw8x            1/1       Running   0          39m\nkube-system   kube-scheduler-928627977-3llcb            1/1       Running   0          39m\n```\n\nAfter install the [kubernetes-dashboard][] the UI should be available at\n[http://172.17.4.101:32010](http://172.17.4.101:32010/#/workload?namespace=_all):\n\n```bash\nkubectl --namespace=kube-system apply -f https://rawgit.com/kubernetes/dashboard/master/src/deploy/kubernetes-dashboard.yaml\n```\n\n## Running Prometheus\n\nThere are many options to install and configure Prometheus in Kubernetes.\n\nThe most basic one is to create the necessary pod spec, service spec and\ndeployment/petset spec on your own. There are various [Helm][] charts available\nin the Kubernetes ecosystem to make it easier to share such specifications.\n\nA very recent new option is to use [CoreOS][]' [prometheus-operator][] which\nprovides Kubernetes controller and extensions making the configuration of\nPrometheus very easy.\n\nThe following command will install the Prometheus Operator and upload a\nPrometheus specification. The operator will watch for such specs and configure\nPrometheus accordingly.\n\n```bash\nscripts/deploy\n```\n\n\n[bootkube]: https://github.com/kubernetes-incubator/bootkube\n[containerdays nyc]: http://dynamicinfradays.org/events/2016-nyc/\n[coreos]: https://coreos.com/\n[helm]: https://github.com/kubernetes/helm\n[kube-prometheus]: https://github.com/coreos/kube-prometheus\n[kubernetes-dashboard]: https://github.com/kubernetes/dashboard\n[minikube]: https://github.com/kubernetes/minikube\n[prometheus-operator]: https://github.com/coreos/prometheus-operator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrobie%2Fprometheus-on-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrobie%2Fprometheus-on-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrobie%2Fprometheus-on-kubernetes/lists"}