kubernetes / kube-state-metrics

Add-on agent to generate and expose cluster-level metrics.
https://kubernetes.io/docs/concepts/cluster-administration/kube-state-metrics/
Apache License 2.0
5.33k stars 1.99k forks source link

How to update upgrade or uninstall kube-state-metrics #2102

Closed Thorien closed 1 week ago

Thorien commented 1 year ago

What would you like to be added: I would like to ask for enhancing documentation on how to update the kube-state-metrics (KSM) to latest version. Or in case I decide, how do I uninstall it. Even without helm charts.

Why is this needed: We have setup cluster more then 2 years ago, at that time the kube-state-metrics has been installed with the cluster. Perhaps at that time it was default configuration for the new cluster creation. Our cluster is now running v 1.26 but the KSM is quite old:

kube-system                 kube-state-metrics                     1/1     1            1           2y106d   kube-state-metrics                                   quay.io/coreos/kube-state-metrics:v1.9.5  

It was not installed using helm chart.

I would like to know how to upgrade or uninstall the KSM from the cluster. Or how to check if anything in the cluster depends on KSM to function.

Describe the solution you'd like I would like to see some documentation in the reame for upgrading KSM version or unistalling. With and without helm charts

CatherineF-dev commented 1 year ago

helm is recommended https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics

dgrisonnet commented 1 year ago

Migrating from v1.9.5 can be quite challenging since there was a couple of breaking changes in v2: https://github.com/kubernetes/kube-state-metrics/blob/release-2.0/CHANGELOG.md.

That said I would still heavily encourage you to upgrade since v1 has been unsupported for a while now. There was a few breaking changes in v2 as well but far less, so I would recommend you to go through the changelogs and check if you are using any of the metrics that we've changed.

Other than that, if you are not a fan of helm you can still deploy kube-state-metrics by using the standard manifests from this repo: https://github.com/kubernetes/kube-state-metrics/tree/main/examples/standard. It will give you a basic installation of kube-state-metrics.

/triage accepted /kind support

k8s-triage-robot commented 2 months ago

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

dashpole commented 1 week ago

/close the question was answered