yq

yq is a lightweight and portable command-line YAML, JSON and XML processor. yq uses jq like syntax but works with yaml files as well as json, xml, properties, csv and tsv. It doesn't yet support everything jq does - but it does support the most common operations and functions, and more is being added continuously. yq is written in go - so you can download a dependency free binary for your platform and you are good to go! If you prefer there are a variety of package managers that can be used as well as Docker and Podman, all listed below.

Some examples:
# decode kubernetes secret as yaml
kubectl get secret some_secret -o yaml | yq '(.data)=(.data|map_values(@base64d))'

# update key-value pair inside a nested yaml
some_variable=5 yq -i '.spec.template.spec.containers[].env += {"name": "key", "value": env(some_variable)}' deployment-some-service.yaml