<p>You're missing namespace in the upgrade command. Following should work:</p>
<pre><code>helm upgrade chart-repository chart-repository/ -n charts
</code></pre>

CC BY-SA 4.0
2021-06-08T20:11:51.917Z
hi, thanks. that worked but i am getting this error. any idea why i might be guessing this `error: UPGRADE FAILED: cannot patch "chart-repository-chartmuseum" with kind Deployment: Deployment.apps "chart-repository-chartmuseum" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app.kubernetes.io/instance":"chart-repository", "app.kubernetes.io/name":"chartmuseum"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable`
ray an
CC BY-SA 4.0
2021-06-08T21:50:57.287Z
So selector changed and it does not support this kind of upgrade. What you can do - delete this deployment via kubectl (kubectl delete deployment chart-repository-chartmuseum) - and then re-do the helm upgrade command. Note that this would cause some downtime.
taleodor
CC BY-SA 4.0
2021-06-08T21:52:20.780Z
+ Feel free to join my Discord for quick questions - https://discord.gg/UTxjBf9juQ - I curate that and here I can miss something
taleodor
CC BY-SA 4.0
2021-06-08T19:48:18.703Z
2021-06-08T19:48:18.703Z
taleodor
<p>I am trying to upgrade a chart but when I run upgrade command, upgrade fails with the following error.</p>
<pre><code>nit:~/copy&gt; helm upgrade chart-repository chart-repository/
Error: UPGRADE FAILED: &quot;chart-repository&quot; has no deployed releases
</code></pre>
<p>but when I do <code>helm list -A</code> , it looks to me it is deployed.</p>
<pre><code>nit:~/copy&gt; helm ls -A
NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART                   APP VERSION
chart-repository    charts      1           2021-06-08 14:43:05.186875759 +0000 UTC deployed    chart-repository-0.0.16 0.0.14   
</code></pre>
<p>So, why is the upgrade failing?
i am using helm 3.6.0.</p>
<p>Thanks</p>

<kubernetes><helm>
helm upgrade fail with error: UPGRADE FAILED: "chart-repository" has no deployed releases
ray an
# helm upgrade fail with error: UPGRADE FAILED: "chart-repository" has no deployed releases

(Asked by: username_0 on 2021-06-08)

I am trying to upgrade a chart but when I run upgrade command, upgrade fails with the following error.
nit:~/copy> helm upgrade chart-repository chart-repository/
Error: UPGRADE FAILED: "chart-repository" has no deployed releases

but when I do helm list -A , it looks to me it is deployed.
nit:~/copy> helm ls -A
NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART                   APP VERSION
chart-repository    charts      1           2021-06-08 14:43:05.186875759 +0000 UTC deployed    chart-repository-0.0.16 0.0.14   

So, why is the upgrade failing?
i am using helm 3.6.0.
Thanks

**Tags:** kubernetes, helm


---

## 1 answers

### Answer by username_1 on 2021-06-08. Score: 1 | Accepted answer

You're missing namespace in the upgrade command. Following should work:
helm upgrade chart-repository chart-repository/ -n charts

> **Comments:**
> **username_0**: hi, thanks. that worked but i am getting this error. any idea why i might be guessing this `error: UPGRADE FAILED: cannot patch "chart-repository-chartmuseum" with kind Deployment: Deployment.apps "chart-repository-chartmuseum" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app.kubernetes.io/instance":"chart-repository", "app.kubernetes.io/name":"chartmuseum"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable`  
> **username_1**: So selector changed and it does not support this kind of upgrade. What you can do - delete this deployment via kubectl (kubectl delete deployment chart-repository-chartmuseum) - and then re-do the helm upgrade command. Note that this would cause some downtime.  
> **username_1**: + Feel free to join my Discord for quick questions - https://discord.gg/UTxjBf9juQ - I curate that and here I can miss something  

---

