kube-state-metrics
Nacos
Our great sponsors
kube-state-metrics | Nacos | |
---|---|---|
33 | 2 | |
5,026 | 28,824 | |
1.8% | 1.3% | |
8.9 | 9.4 | |
8 days ago | 4 days ago | |
Go | Java | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
kube-state-metrics
- Do we have any Prometheus metric to get the kubernetes cluster-level CPU/Memory requests/limits?
-
Prometheus node exporter and cadvisor to send metrics to central prometheus cluster
Those are entirely different types of data. You can get that from something like kube-state-metrics
-
Questions about Kubernetes
Kubernetes itself will not notify you, the way I've seen people do this, is to use something like kube-state-metrics or node_exporter, export that to Prometheus (or preferrably VictoriaMetrics because Prometheus is terrible IMO), and then setup alarms on that with alertmanager or equivalent, or just look at dashboards regularly with Grafana. Realistically I recommend only setting alerts on disk usage and application/database latency. CPU and memory utilization isn't a great metric to alert on a lot of the time.
-
Observability-Landscape-as-Code in Practice
We then have various other Metrics called Kubernetes Workload Metrics. These are the dashboards with names that start with “Kubernetes / Compute Resources / Workload”. These dashboards are specific to the services you are running. They take into account the Kubernetes Workloads in your various namespaces, using kube-state-metrics. For a closer look, check out otel_demo_app_k8s_dashboard.tf.
-
Kubernetes Costs: Effective Cost Optimization Strategies To Reduce Your k8s Bill
The first step to optimizing costs is gaining visibility into your costs using tools. Kubernetes provides a Metrics Server and kube-state-metrics that can give you the overall picture of resource utilization by your cluster. There are more tools that provide more granular breakdowns and provide dashboards with business metrics, infra cost, and alerting functionalities. Here are some strategies to optimize your resource utilization and cloud bills on k8s.
-
Namespace pods accounting
If you have the kube-state-metrics + Prometheus with a sufficiently long retention time, then you could write a PromQL query based on the "kube_pod_created" metric to get the answer to your question. It might be possible with the metrics-server + Prometheus, but I think it would not count some pods that live less than one scrape interval.
- Métricas cAdvisor no Kubernetes com Prometheus e Grafana
-
Kubernetes' Native Metrics and States
There is, also developed by k8s team, the kube-state-metrics, a service that listens to the Kubernetes API server and generates metrics about the state of the objects such as deployments, nodes, and pods.
-
7 essential Kubernetes GitHub Projects you should know about 🔥🚀
2. kube-state-metrics
- I just passed the CKA!! Here are some tips (2022)
Nacos
What are some alternatives?
cadvisor - Analyzes resource usage and performance characteristics of running containers.
metrics-server - Scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.
Quarkus - Quarkus: Supersonic Subatomic Java.
Micronaut - Micronaut Application Framework
php-fpm_exporter - A prometheus exporter for PHP-FPM.
apollo - Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
spring-cloud-kubernetes - Kubernetes integration with Spring Cloud Discovery Client, Configuration, etc...
spring-cloud-vault - Configuration Integration with HashiCorp Vault
k3s - Lightweight Kubernetes
kubespray - Deploy a Production Ready Kubernetes Cluster
Sentinel - A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)
kube-metrics-adapter - General purpose metrics adapter for Kubernetes HPA metrics