I believe the number of port requirement depends on the number of connection that is being opened by services using the Cloud NAT to communicate with an external endpoint. If you would like to know if you are exhausting allocated ports, you might want to enable logging from
Go to "NAT gateway details" Click on EDIT then expand "Logging, minimum ports, timeout" and select logging options
Export Cloud NAT logs to Stackdriver:
- No logging --disable logging
- Translation and errors -- Will log Translation and error both
- Translation only ---Will log Translation only
- Errors only ---Will log error only.
When the logging is enabled, all collected logs are sent to Stackdriver by default. NAT flow logs provide two types of logs:
- Translation: a VM instance initiates a connection that is
successfully allocated to a NAT IP and port and traverses to the
internet
- Error: a VM instance attempts to connect to the internet by sending a
packet over the connection, but the NAT gateway can't allocate a NAT
IP and port due to port exhaustion
You can also find the details of gcloud command in Configuring logging section under Cloud NAT logging.