How to apply helm chart to existing resources?

2/19/2018

Is there any way to apply a helm chart to existing resources?

Eg: I have already created a namespace manually and now I want to "helmify" it. But when I add a new template file to my chart and run helm upgrade I get an error:

Error: UPGRADE FAILED: no Namespace with the name "ingress-haproxy" found

I saw this issue but it's not very helpful: https://github.com/kubernetes/helm/issues/1999

-- grdl
kubernetes-helm

1 Answer

6/11/2019

Is the manually created namespace named "ingress-haproxy" ?

From the error you're getting it seems:

  1. the namespace does not exist (maybe it has a slightly different name)..
  2. you've previously ran helm install since otherwise it would have complained about the inexistent helm release name.

Anyway, for now, the answer is no, helm does not support ignoring existing resources. You can follow this issue for any updates : https://github.com/helm/helm/issues/4824

Currently your only chance is to remove all objects and have them recreated via helm install. If this is not acceptable, leave them in place and manage them via kubectl apply and manage all your other objects via helm charts.

-- Cosmin Sontu
Source: StackOverflow