<mohammadrony>

yq

Installation

sudo snap install yq

Commands

json to yaml

yq -P output.json
cat output.json | yq -P

Edit yaml

yq e -i '.spec.type="NodePort"' service.yaml
yq e -i '.spec.ports[0].nodePort = PORT_NUMBER' service.yaml