尘叶心繁

k8s编写yaml文件的一些小问题

电脑版发表于:2020/3/19 10:55


  Yaml文件编写的小毛病

kubenetes yaml

 随在编写yaml文件中难免会出现一些磕磕碰碰的问题

    建议大家去这个网站编写 yaml 文件 https://www.toolfk.com/tool-format-yaml 或 https://www.bejson.com/validators/yaml_editor/

   当我们点击验证按钮出现

Error : A YAML file cannot contain tabs as indentation
Line  : 8        app: nginx

  1. 你就需要注意第八行格式是否有对齐

  2. 在第八行的开头是否有按过 Tab键 ,建议大家尽量用 空格

   




关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢