[debug] error converting YAML to JSON: yaml: line 42: did not find expected ‘:‘ indicator

使用kubectl creat -f执行一个yaml脚本的过程中报错:

[debug] error converting YAML to JSON: yaml: line 42: did not find expected ':' indicator

后来仔细检查,错误原因是不同段落之前的分隔符本应该是"---"(三个减号),少写了一个,只有两个。将分隔符补齐,报错提示消失。

你可能感兴趣的:(k8s)