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
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"]
I think it is the command caused the error.
sed -i $a\\-Djdk.tls.rejectClientInitiatedRenegotiation=true /opt/app/a.ini