YAML parse error on curl command parameters YAML parse error on curl command parameters kubernetes kubernetes

YAML parse error on curl command parameters


thats because your curl command contains semicolon so yaml thinks you are trying to define an object. to fix the error:

  1. escape every " with backlslash: \"
  2. wrap the entire line with "

therefore-

 - curl "https://test-es01.test.svc.clu01.test.local:9200/logs_write/_rollover" -H 'Content-Type: application/json' -d '{"conditions: {"max_size": "5gb"}}'

should be escaped to

- "curl \"https://test-es01.test.svc.clu01.test.local:9200/logs_write/_rollover\" -H 'Content-Type: application/json' -d '{\"conditions: {\"max_size\": \"5gb\"}}'\n"

http://www.yamllint.com/ is a great place to track down such bugs.