Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dws): Adding a job that's compatible with GKE autopilot #983

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

m-strzelczyk
Copy link

When running the example from the documentation page on GKE Autopilot cluster, when we reach the step to run kubectl create -f ./job.yaml I ended up with an error:

Error from server (GKE Warden constraints violations): error when creating "./job.yaml": admission webhook "warden-validating.common-webhooks.networking.gke.io" denied the request: GKE Warden rejected the request because it violates one or more constraints.
Violations details: 
{
   "[denied by autogke-gpu-limitation]":[
      "When requesting 'nvidia.com/gpu' resources, you must specify either node selector 'cloud.google.com/gke-accelerator' with accelerator type or node selector 'cloud.google.com/compute-class' with existing custom compute class which has at least one GPU priority rule."
   ],
   "[denied by autogke-node-affinity-selector-limitation]":[
      "Key 'cloud.google.com/gke-nodepool' is not allowed with node selector; Autopilot only allows labels with keys: cloud.google.com/compute-class,cloud.google.com/machine-family,cloud.google.com/gke-ephemeral-storage-local-ssd,cloud.google.com/gke-spot,cloud.google.com/gke-placement-group,topology.kubernetes.io/region,topology.kubernetes.io/zone,failure-domain.beta.kubernetes.io/region,failure-domain.beta.kubernetes.io/zone,cloud.google.com/gke-os-distribution,kubernetes.io/os,kubernetes.io/arch,cloud.google.com/private-node,sandbox.gke.io/runtime,cloud.google.com/gke-accelerator,cloud.google.com/gke-accelerator-count,iam.gke.io/gke-metadata-server-enabled,cloud.google.com/reservation-name,cloud.google.com/gke-tpu-accelerator,cloud.google.com/gke-tpu-topology,cloud.google.com/reservation-project,cloud.google.com/reservation-affinity,cloud.google.com/gke-gpu-sharing-strategy,cloud.google.com/gke-max-shared-clients-per-gpu,cloud.google.com/gke-gpu-partition-size,cloud.google.com/pods-per-node,cloud.google.com/gke-boot-disk,cloud.google.com/gke-boot-disk-size,cloud.google.com/gke-gpu-driver-version,cloud.google.com/gke-nccl-fastsocket,cloud.google.com/pods-per-node,autoscaling.gke.io/provisioning-request."
   ]
}

It seems that this job definition is not friendly towards Autopilot clusters. That's why I'm adding job-autopilot.yaml, that works with autopilot clusters and allows for completion of this example. It's exactly the same as job.yaml, except it replaces cloud.google.com/gke-nodepool: NODEPOOL_NAME with cloud.google.com/gke-accelerator: "nvidia-tesla-t4"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant