The sample script manual_node_upgrade.sh filters all node pools not matching the control plane's k8s version for a specified cluster. For each node pool identified by the filter, this script submits an upgrade request via the gcloud command. This script is idempotent and can be run as many times as necessary to ensure all node pools manually upgrade without side effects.
For more information about GKE manual upgrades, consult the online documentation: https://cloud.google.com/kubernetes-engine/docs/how-to/upgrading-a-cluster