Ruc*_*waj 5 kubernetes-helm helmfile
我正在尝试使用以下命令安装 helm 版本
helm upgrade --install --reset-values {release-name} ../chart --namespace test01 --values /tmp/values737957648
Run Code Online (Sandbox Code Playgroud)
图表未打包以展开形式保存。
这失败并出现以下错误,它基本上试图存储发布信息
sh.helm.release.v1.{release-name}.v1" is invalid: data: Too long: must have at most 1048576 characters
Run Code Online (Sandbox Code Playgroud)
如何去调试这个问题?
如果我尝试生成图表模板并执行 kubectl create 它会安装得很好。即
helm template {release-name} chart --namespace test01 --values /tmp/values737957648 >> test1.yaml
kubectly create test1.yaml (No configmap/No secret limit issue)
Run Code Online (Sandbox Code Playgroud)
尝试通过 helm 安装并尝试创建 helm-secret 时出现问题
我该如何解决这个问题?
我正在使用掌舵版本
helm version
version.BuildInfo{Version:"v3.0.2", GitCommit:"19e47ee3283ae98139d98460de796c1be1e3975f",
GitTreeState:"clean", GoVersion:"go1.13.5"}
Run Code Online (Sandbox Code Playgroud)
Ily*_*iev 19
就我而言,根本原因非常出乎意料:图表文件夹包含 xxxx.tgz 文件(存档文件被错误地留在那里),直到它被删除,我一直收到此错误。该错误消息甚至不接近真正的根本原因。
hej*_*oaz 10
就我而言,我有一个包含一些图像的“img/”目录...周末我添加了许多大的 png 文件...并且出现了类似的错误...
% helm upgrade --install {release name} {mychart} -f values-mychart-custom.yaml --debug
history.go:56: [debug] getting history for release mychart
Release "mychart" does not exist. Installing it now.
install.go:178: [debug] Original chart version: ""
install.go:199: [debug] CHART PATH: Library/Caches/helm/repository/mychart-1.0.0.tgz
Error: create: failed to create: Secret "sh.helm.release.v1.mychart.v1" is invalid: data: Too long: must have at most 1048576 bytes
helm.go:88: [debug] Secret "sh.helm.release.v1.mychart.v1" is invalid: data: Too long: must have at most 1048576 bytes
create: failed to create
helm.sh/helm/v3/pkg/storage/driver.(*Secrets).Create
helm.sh/helm/v3/pkg/storage/driver/secrets.go:164
helm.sh/helm/v3/pkg/storage.(*Storage).Create
helm.sh/helm/v3/pkg/storage/storage.go:69
helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
helm.sh/helm/v3/pkg/action/install.go:340
main.runInstall
helm.sh/helm/v3/cmd/helm/install.go:265
main.newUpgradeCmd.func2
helm.sh/helm/v3/cmd/helm/upgrade.go:124
github.com/spf13/cobra.(*Command).execute
github.com/spf13/cobra@v1.2.1/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
github.com/spf13/cobra@v1.2.1/command.go:974
github.com/spf13/cobra.(*Command).Execute
github.com/spf13/cobra@v1.2.1/command.go:902
main.main
helm.sh/helm/v3/cmd/helm/helm.go:87
runtime.main
runtime/proc.go:255
runtime.goexit
runtime/asm_amd64.s:1581
Run Code Online (Sandbox Code Playgroud)
经过漫长的一天的丑陋的 Helm 调试后,我将“img/”文件夹移出图表目录,然后一切再次工作......
:)
线索:生成清单文件,应用它们并检查是否正确
% helm template mychart chart --values ./values.yaml > debug.yaml
% kubectl apply -f debug.yaml
% kubectl delete -f debug.yaml
Run Code Online (Sandbox Code Playgroud)
这个答案直接来自:https : //jhooq.com/helm-chart-failed-to-create/
此问题背后的根本原因可能是以下之一 -
就我而言,我的图表名称中有下划线。当我用破折号替换下划线时,图表部署得很好。
| 归档时间: |
|
| 查看次数: |
4222 次 |
| 最近记录: |