The first message you see is shown because there is not a machine-type named nvidia-tesla-p4
in GCP. In this document there is a comprehensive list of the available machine-types, but make sure to use a machine type available in the region and zone where you're spinning up your GKE cluster. You can check the valid machine-types available in a zone with this command: gcloud compute machine-types list --filter="zone:( ZONE … )"
Regarding the second message, it is clear that you don't have enough quota for that specific GPU in that region. As @hilsenrat has mentioned, you can't see any quotas being exhausted as the cluster never got created in the first place.
As mentioned in the Availability section of the documentation on running GPUs in GKE:
GPUs are available in specific regions and zones. When you request GPU quota, consider the regions in which you intend to run your clusters.
For a complete list of applicable regions and zones, refer to GPUs on Compute Engine.
To see a list of all GPU accelerator types supported in each zone, run the following command:gcloud compute accelerator-types list --filter="zone:( ZONE )"
As when you add a GPU to a preemptible instance, you use your regular GPU quota, I would also make sure that the quota for V100 in the REGION is enough. If you need a separate quota for preemptible GPUs, request a separate Preemptible GPU quota as described here.
I suggest going to the quota page and filtering these specific quotas, making sure you click on "ALL QUOTAS" under the Details column. Regional quotas will be displayed.
Service: Compute Engine API
-
Name: GPUs (all regions)
-
Quota Metric: compute.googleapis.com/gpus_all_regions
-
Limit Name: GPUS-ALL-REGIONS-per-project
Service: Compute Engine API
-
Name: NVIDIA V100 GPUs
-
Quota Metric: compute.googleapis.com/nvidia_v100_gpus
-
Limit Name: NVIDIA-V100-GPUS-per-project-zone/NVIDIA-V100-GPUS-per-project-region
Service: Compute Engine API
-
Name: Preemptible NVIDIA V100 GPUs
-
Quota Metric: compute.googleapis.com/preemptible_nvidia_v100_gpus
-
Limit Name: PREEMPTIBLE-NVIDIA-V100-GPUS-per-project-zone/PREEMPTIBLE-NVIDIA-V100-GPUS-per-project-region
Make sure you have enough GLOBAL AND REGIONAL quota for the specific GPU model you are trying to use. Preemptible GPUs need to be requested separately as mentioned here.
------UPDATE----
Also, please note that only regional quotas can be requested for an increase. Any zonal quota listed is dependant on the corresponding regional quota. In this capture, even if the zonal limits read unlimited, the regional quota is 0 and attempting to use GPUs in the whole region will fail. (As you can see, only regional quota is selectable for edition).
You mention that now you get a message mentioning you don't have enough quota for A2 CPUs. Please make sure to have enough CPU quota in the Region AND enough A2 CPU quota as well. For this you have to consider the number of vCPUs required for the machine type you want to deploy.
You can read more about working with CPU quotas here.
I hope this information is useful an clarifies your question.