<p>When I want to run the following YAML file, I get the following error:
error converting YAML to JSON: yaml: line 30: found unknown escape character</p>

<pre><code>kind: Deployment
apiVersion: apps/v1beta2
metadata:
  labels:
    run: $DEPLOYMENT_NAME
  name: $DEPLOYMENT_NAME
  namespace: default
spec:
  replicas: 2
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      run: $TEMPLATE_LABEL
  template:
    metadata:
      labels:
        run: $TEMPLATE_LABEL
    spec:
      containers:
      - name: wapp
        image: $IMAGE_WCE
        lifecycle:
          postStart:
            exec:
              command: ["/bin/sh", "-c", "sed -i $a\-Djdk.tls.rejectClientInitiatedRenegotiation=true /opt/app/a.ini"]
</code></pre>

<p>I think it is the command caused the error. </p>

<pre><code>sed -i $a\\-Djdk.tls.rejectClientInitiatedRenegotiation=true /opt/app/a.ini
</code></pre>

<p>I think the problem is the <code>\-</code> in your sed command.
Just looking at the <a href="https://yaml.org/spec/1.2/spec.html#style/flow/double-quoted" rel="noreferrer">yaml spec</a>, if you use double-quotes you have to escape the backslash, ie: <code>\\-</code>
but what about using single-quotes?</p>
