我正在尝试使用 --dry-run
选项测试我的开发头盔聊天部署输出 . 当我运行以下命令时,它试图连接到Kubernetes API服务器 .
连接Kubernetes集群需要干运行选项吗?我只想检查部署yaml文件输出 .
helm install mychart-0.1.0.tgz --dry-run --debug
Error: Get http://localhost:8080/api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
2 回答
正如Helm's documentation所述
因此,它仍然需要连接到Tiller以使用正确的值呈现模板 . 使用--dry-run选项的不同之处在于它实际上不会安装图表 .
还有一个选项可以运行
helm template ./mychart
来渲染生成的YAML而无需连接到分蘖 . 结合helm lint
,它是验证图表有效性的好方法 .