RealTheory can notify you if Kube State Metrics is a required component in your environment that is not present on your cluster or if the version of Kube State Metrics that is installed is not in compliance with organizational standards.
If Kube State Metrics is a required component in your Kubernetes environment, it is most likely that the Helm Chart or the manifest file needed for the installation already exist. Contact your Operations or DevOps team to determine if there are company resources for installing Kube State Metrics BEFORE using either of the following procedures.
To install Kube State Metrics:
helm repo add kube-state-metrics https://github.com/kubernetes/kube-state-metrics helm repo updatekubectl create namespace kube-state-metricshelm install kube-state-metrics kube-state-metrics/kube-state-metrics --namespace kube-state-metricshelm install kube-state-metrics kube-state-metrics/kube-state-metrics --namespace kube-state-metrics --version <version> <version> is the version number of Kube State Metrics you want to install.kubectl get pods -n kube-state-metrics To install Kube State Metrics:
kubectl apply -f https://github.com/kubernetes/kube-state-metrics/releases/latest/download/kube-state-metrics-standalone-release.yamlkubectl get pods -n <namespace> <namespace> is the namespace where Kube State Metrics was installed. If a specific version of Kube State Metrics is required in your Kubernetes environment, it is most likely that the Helm Chart or the manifest file already exist. Contact your Operations or DevOps team to determine if there are company resources for upgrading Kube State Metrics BEFORE using either of the following procedures.
To upgrade Kube State Metrics:
helm upgrade <release-name> kube-state-metrics/kube-state-metrics --namespace <namespace> <release-name> is the name of the Kube State Metrics release and <namespace> is the namespace where Kube State Metrics is installed.helm upgrade <release-name> kube-state-metrics/kube-state-metrics --namespace <namespace> --version <version> <release-name> is the name of the Kube State Metrics release, <namespace> is the namespace where Kube State Metrics is installed, and <version> is the version number of Kube State Metrics you want to upgrade to.kubectl get pods -n <namespace> <namespace> is the namespace where Kube State Metrics is installed. To upgrade Kube State Metrics:
kubectl apply -f https://github.com/kubernetes/kube-state-metrics/releases/latest/download/kube-state-metrics-standalone-release.yamlkubectl apply -f https://github.com/kubernetes/kube-state-metrics/releases/download/<version>/kube-state-metrics-standalone-release.yaml <version> is the version number of Kube State Metrics you want to upgrade to.kubectl get pods -n <namespace> <namespace> is the namespace where Kube State Metrics is installed. Search for a command to run...