github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/kube-state-metrics/README.md (about)

     1  # kube-state-metrics Helm Chart
     2  
     3  Installs the [kube-state-metrics agent](https://github.com/kubernetes/kube-state-metrics).
     4  
     5  ## Get Repository Info
     6  <!-- textlint-disable -->
     7  ```console
     8  helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
     9  helm repo update
    10  ```
    11  
    12  _See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._
    13  <!-- textlint-enable -->
    14  
    15  ## Install Chart
    16  
    17  ```console
    18  helm install [RELEASE_NAME] prometheus-community/kube-state-metrics [flags]
    19  ```
    20  
    21  _See [configuration](#configuration) below._
    22  
    23  _See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
    24  
    25  ## Uninstall Chart
    26  
    27  ```console
    28  helm uninstall [RELEASE_NAME]
    29  ```
    30  
    31  This removes all the Kubernetes components associated with the chart and deletes the release.
    32  
    33  _See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
    34  
    35  ## Upgrading Chart
    36  
    37  ```console
    38  helm upgrade [RELEASE_NAME] prometheus-community/kube-state-metrics [flags]
    39  ```
    40  
    41  _See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
    42  
    43  ### Migrating from stable/kube-state-metrics and kubernetes/kube-state-metrics
    44  
    45  You can upgrade in-place:
    46  
    47  1. [get repository info](#get-repository-info)
    48  1. [upgrade](#upgrading-chart) your existing release name using the new chart repository
    49  
    50  ## Upgrading to v3.0.0
    51  
    52  v3.0.0 includes kube-state-metrics v2.0, see the [changelog](https://github.com/kubernetes/kube-state-metrics/blob/release-2.0/CHANGELOG.md) for major changes on the application-side.
    53  
    54  The upgraded chart now the following changes:
    55  
    56  * Dropped support for helm v2 (helm v3 or later is required)
    57  * collectors key was renamed to resources
    58  * namespace key was renamed to namespaces
    59  
    60  ## Configuration
    61  
    62  See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments:
    63  
    64  ```console
    65  helm show values prometheus-community/kube-state-metrics
    66  ```
    67  
    68  ### kube-rbac-proxy
    69  
    70  You can enable `kube-state-metrics` endpoint protection using `kube-rbac-proxy`. By setting `kubeRBACProxy.enabled: true`, this chart will deploy one RBAC proxy container per endpoint (metrics & telemetry).
    71  To authorize access, authenticate your requests (via a `ServiceAccount` for example) with a `ClusterRole` attached such as:
    72  
    73  ```yaml
    74  apiVersion: rbac.authorization.k8s.io/v1
    75  kind: ClusterRole
    76  metadata:
    77    name: kube-state-metrics-read
    78  rules:
    79    - apiGroups: [ "" ]
    80      resources: ["services/kube-state-metrics"]
    81      verbs:
    82        - get
    83  ```
    84  
    85  See [kube-rbac-proxy examples](https://github.com/brancz/kube-rbac-proxy/tree/master/examples/resource-attributes) for more details.