How can I replace the Image used in a Kubernetes Deployment manifest with jq?
For example:
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: myapp
name: myapp-deployment
spec:
replicas: 1
template:
spec:
containers:
- name: myapp
image: myapp:v1
I tried using something like this jq '.spec.template.spec.containers[0].image = "myapp:v2"'
. However, it always ends with a syntax or parse error.