# Error Parse Yaml to Json with curl --data

**URL:** https://discuss.kubernetes.io/t/error-parse-yaml-to-json-with-curl-data/15712
**Category:** General Discussions
**Tags:** development
**Created:** [April 28, 2021, 5:27pm UTC](https://discuss.kubernetes.io/t/error-parse-yaml-to-json-with-curl-data/15712 "2021-04-28T17:27:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![RME\_Kube](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/rme_kube/32/7518_2.png) [@RME\_Kube](https://discuss.kubernetes.io/u/RME_Kube)
#### Post date: [April 28, 2021, 5:27pm UTC](https://discuss.kubernetes.io/t/error-parse-yaml-to-json-with-curl-data/15712/1 "2021-04-28T17:27:47Z")

</div>

Hello,

I simply fail to push configuration :

```
  command:
    - /bin/sh
    - -c
    - date; sleep 20 ; echo "Example CronJob for Show Elasticserach Welcome Page"; "/usr/bin/curl -u '{{ .Values.busybox.username }}:{{ .Values.busybox.password }}' --request PUT --header \"Content-Type: application/json\" \"http://{{ .Values.elasticsearch.data.service_ip }}-{{ .Release.Name }}:9200/_cluster/settings\" -d '{\"transient\": {\"cluster.routing.allocation.cluster_concurrent_rebalance\" : \"8\"} }'\" ; exit 0

```

`Error: UPGRADE FAILED: YAML parse error on cronjob.yaml: error converting YAML to JSON: yaml: line 26: mapping values are not allowed in this context`

I tested in yamlint is ok …

This commande work good :  
`/usr/bin/curl -u '{{ .Values.busybox.username }}:{{ .Values.busybox.password }}' -XGET \"http://{{ .Values.elasticsearch.data.service_ip }}-{{ .Release.Name }}:9200`

It seems the -d in curl is not accepted ?

Best Regards

RME
