I try to patch a deployment with the following command:
kubectl patch deployment spin-clouddriver -n spinnaker --type='json' -p='[{"op": "add", "path": "/spec/spec/containers/0/volumeMounts", "value": {"mountPath": "/etc/ssl/certs/java/cacerts", "subPath": "cacerts", "name": "cacerts"}}]'
which results in
The "" is invalid
I don't see where is the error nor do I see how the message helps me to find the problem. Any hints?
The correct path is "path": "/spec/template/spec/containers/0/volumeMounts
. There was missing template key.