<p><strong>Problem: For some reason, helm release of <code>kube-prometheus-stack</code> is stuck in <code>Pending-install</code> status. What is the correct to install a helm release for this using <code>helm cli</code>?</strong></p>
<p><strong>Details:</strong></p>
<p>Due to Docker registry <code>k8s.gcr.io</code> getting frozen, I had to update the Docker image registry to <code>registry.k8s.io</code> for <code>kube-state-metrics</code> by updating the <code>values.yaml</code> as follows:</p>
<pre class="lang-yaml prettyprint-override"><code>kube-state-metrics:
  prometheusScrape: true
  image:
    repository: registry.k8s.io/kube-state-metrics/kube-state-metrics
    tag: v1.9.8
    pullPolicy: Always
  namespaceOverride: &quot;&quot;
  rbac:
    create: true
  podSecurityPolicy:
    enabled: true
</code></pre>
<p>After that, when I tried update the helm release for <code>kube-prometheus-stack</code> using same version of <code>14.9.0</code>, it failed with status <code>Failed</code> for helm release. Upon retrying, it deleted the previous helm release and created a new one. All the components by the new one created successfully but the helm release got stuck in the <code>Pending-install</code> status.</p>
<p>I waited for almost 30 minutes but no success. I also tried deleting helm release, rollbacking helm release, deleting helm release secret but got no success.</p>
<p>What could be the issue? How can I solve it?</p>

Abdullah Khawer
<p><strong>Solution:</strong> After some investigation, I found that there was a job named <code>kube-prometheus-stack-admission-patch</code> which was failing with <code>BackoffLimitExceeded</code> error. It was some kind of an initializing job. Deleting the job (not pod) fixed the issue and the helm release changed its status to <code>Deployed</code>.</p>
<p><strong>Error Log in <code>kube-prometheus-stack-admission-patch</code> job:</strong></p>
<pre><code>W0331 10:58:03.079451       1 client_config.go:608] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
{&quot;level&quot;:&quot;info&quot;,&quot;msg&quot;:&quot;patching webhook configurations 'kube-prometheus-stack-admission' mutating=true, validating=true, failurePolicy=Fail&quot;,&quot;source&quot;:&quot;k8s/k8s.go:39&quot;,&quot;time&quot;:&quot;2023-03-31T10:58:03Z&quot;}
{&quot;err&quot;:&quot;the server could not find the requested resource&quot;,&quot;level&quot;:&quot;fatal&quot;,&quot;msg&quot;:&quot;failed getting validating webhook&quot;,&quot;source&quot;:&quot;k8s/k8s.go:48&quot;,&quot;time&quot;:&quot;2023-03-31T10:58:03Z&quot;}
</code></pre>
