Set a field value in-place yq

Modify YAML file in-place with yq v4

yq -i '.spec.replicas = 3' deployment.yaml
#yq