Skip to content

[k8s] Fix show-gpus when limited permissions are available #4208

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

Merged
merged 5 commits into from
Nov 12, 2024

Conversation

romilbhardwaj
Copy link
Collaborator

@romilbhardwaj romilbhardwaj commented Oct 30, 2024

Updates our minimal permissions doc to add permissions required by show-gpus, and updates show-gpus to work with limited permissions:

W 10-29 18:36:09 kubernetes_catalog.py:112] Failed to get pods in the Kubernetes cluster (forbidden). Please check if your account has necessary permissions to list pods. Realtime GPU availability information may be incorrect.
Kubernetes GPUs (context: gke_sky-dev-465_us-central1-c_gkeusc6)
GPU   REQUESTABLE_QTY_PER_NODE  TOTAL_GPUS  TOTAL_FREE_GPUS
H100  1, 2, 4, 8                8           NA

Kubernetes per node GPU availability
NODE_NAME                               GPU_NAME  TOTAL_GPUS  FREE_GPUS
gke-gkeusc6-default-pool-db727de5-62gm  H100      8           NA

Also adds a quick snippet for specifying custom resources in pod_config.

@concretevitamin
Copy link
Member

UX: NA may suggest "not available". How about <insufficient permissions>?

@romilbhardwaj
Copy link
Collaborator Author

<insufficient permissions> might be too long... how about <no permissions>? Or even <forbidden>?

@concretevitamin
Copy link
Member

concretevitamin commented Nov 5, 2024 via email

@romilbhardwaj
Copy link
Collaborator Author

Updated:

(base) ➜  ~ sky show-gpus --cloud kubernetes
W 11-11 14:06:42 kubernetes_catalog.py:114] Failed to get pods in the Kubernetes cluster (forbidden). Please check if your account has necessary permissions to list pods. Realtime GPU availability information may be incorrect.
Kubernetes GPUs (context: kind-skypilot)
GPU   REQUESTABLE_QTY_PER_NODE  TOTAL_GPUS  TOTAL_FREE_GPUS
H100  1, 2, 4, 8                8           <no permissions>

Kubernetes per node GPU availability
NODE_NAME               GPU_NAME  TOTAL_GPUS  FREE_GPUS
skypilot-control-plane  H100      8           <no permissions>

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update @romilbhardwaj! LGTM.

Comment on lines +299 to +303
resources: # Custom resource requests and limits
requests:
rdma/rdma_shared_device_a: 1
limits:
rdma/rdma_shared_device_a: 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this relates to the show-gpus?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, just adding docs on how to add custom resources through pod_config. Could have been a separate PR :)

@romilbhardwaj romilbhardwaj added this pull request to the merge queue Nov 12, 2024
Merged via the queue into master with commit 140125e Nov 12, 2024
20 checks passed
@romilbhardwaj romilbhardwaj deleted the k8s_limited_permissions_fix branch November 12, 2024 00:09
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.

3 participants