helm: Error: UPGRADE FAILED: create: failed to create: Secret "sh.helm.release.v1.prometheus.v9" is invalid: data: Too long: must have at most 1048576 bytes
Error: UPGRADE FAILED: create: failed to create: Secret “sh.helm.release.v1.prometheus.v9” is invalid: data: Too long: must have at most 1048576 bytes
was thrown on helm upgrade/install
The reason for this message had nothing to do with secret. It was a large xxxx.tgz file mistakendly placed in the working directory where the helm install was called. There were no dependency on values.yml and so on so they are not added to the issue.
Output of helm version:
helm version version.BuildInfo{Version:“v3.5.3”, GitCommit:“041ce5a2c17a58be0fcd5f5e16fb3e7e95fea622”, GitTreeState:“dirty”, GoVersion:“go1.15.8”}
Output of kubectl version:
kubectl version Client Version: version.Info{Major:“1”, Minor:“16+”, GitVersion:“v1.16.6-beta.0”, GitCommit:“e7f962ba86f4ce7033828210ca3556393c377bcc”, GitTreeState:“clean”, BuildDate:“2020-01-15T08:26:26Z”, GoVersion:“go1.13.5”, Compiler:“gc”, Platform:“windows/amd64”} Server Version: version.Info{Major:“1”, Minor:“20”, GitVersion:“v1.20.2”, GitCommit:“faecb196815e248d3ecfb03c680a4507229c2a56”, GitTreeState:“clean”, BuildDate:“2021-01-13T13:20:00Z”, GoVersion:“go1.15.5”, Compiler:“gc”, Platform:“linux/amd64”}
Cloud Provider/Platform (AKS, GKE, Minikube etc.): DigitalOcean
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 6
- Comments: 15
I also spent a bit too much time to find that the error actually is “Helm stores the full chart as a Secret into K8s to allow rollback and other Helm features, but this chart is too big to fit within your K8s’s specific Secret size limits”. Please consider this an additional vote for a more explanatory error message.
There are already tickets to prevent this issue altogether, I’m just asking for the error message to be clearer to the end user.
I’m still interested in this getting improved.
@mattfarina ok, makes sense. But if there would be possible to have two reasons for the exception, the designed and the occasional one, would it be possible to add one more sentence to the error message and advice a user to check the directory for the accidentally placed tar files, not related to the helm secret?
I also would like to see this error message improved. Had no idea how to solve this until running across this stack overflow thread: https://stackoverflow.com/questions/64554717/helm-fails-with-failed-to-create-secret-sh-helm-release-v1-release-name-v1