问题描述:error: error parsing deploy.yaml.c: error converting YAML to JSON: yaml: line 4: found character that cannot start any token
翻译:错误:分析deploy.yaml时出错。c: 将YAML转换为JSON时出错:YAML:line4:发现无法启动任何标记的字符
原因:在yaml语法中不支持制表符
解决:将制表符换成空格符
借鉴:https://www.cnblogs.com/z-books/p/14202838.html

问题描述:The Deployment “hello-deploy” is invalid: spec.template.spec.containers[0].name: Invalid value: “helloPod”: a DNS-1123 label must consist of lower case alphanumeric characters or ‘-’, and must start and end with an alphanumeric character (e.g. ‘my-name’, or ‘123-abc’, regex used for validation is ‘a-z0-9?’)
愿因:文件格式错误
解决: Invalid value: "helloPod"将helloPod修改成hellopod解决错误

问题描述:error converting YAML to JSON: yaml: line 3: mapping values are not allowed in this context
翻译:错误:分析部署时出错。yaml:将yaml转换为JSON时出错:yaml:第3行:此上下文中不允许映射值
原因:冒号后面没有空格导致
解决:文件中的每个空格后面加空格。

借鉴:https://www.cnblogs.com/z-books/p/14202838.html

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐