Most Helm adoption
kubectl examples will show adding the annotations and label required for Helm 3 to adopt resources, but with Deployments this may cause issues if the nested Pod spec isn’t patched also. Either way you will need to add a
app.kubernetes.io/managed-by label and
meta.helm.sh/release-namespace annotations. For most resources you can simply label or annotate the spec using
kubectl label and
kubectl annotate commands respectively.
However for the Pod spec in Deployments, StatefulSets or DaemonSets you will need to patch the nested Pod spec. Patching the Pod spec can be done with the
kubectl patch command, which you can pass the label or annotation updates to with JSON.