yaml语法

1、yaml复杂结构如下。在线转换网站 https://tool.ip138.com/yamljson/

env:
    - name: PROVISIONER_NAME
      value: k8s-sigs.io/nfs-subdir-external-provisioner
    - name: NFS_SERVER
      value: 192.168.10.94
    - name: NFS_PATH
      value: /data/nfs/auto

 转换json后

{
  "env": [
    {
      "name": "PROVISIONER_NAME",
      "value": "k8s-sigs.io/nfs-subdir-external-provisioner"
    },
    {
      "name": "NFS_SERVER",
      "value": "192.168.10.94"
    },
    {
      "name": "NFS_PATH",
      "value": "/data/nfs/auto"
    }
  ]
}

 

posted @ 2024-03-12 14:36  苦逼yw  阅读(7)  评论(0编辑  收藏  举报