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

[k8s] sky check k8s fails when current context is not available, even if that context is not in allowed_contexts #4449

Open
cg505 opened this issue Dec 9, 2024 · 0 comments
Labels
help wanted Extra attention is needed k8s Kubernetes related items

Comments

@cg505
Copy link
Collaborator

cg505 commented Dec 9, 2024

~/.sky/config.yaml:

kubernetes:
  allowed_contexts:
    - kind-skypilot

current context:

$ kubectl config current-context
gke-dev

kind-skypilot cluster is up, but gke-dev cluster is down.

Expected behavior:
When kubernetes.allowed_contexts is set in ~/.sky/config.yaml, sky check k8s should check if any of these contexts are available. (or, maybe if they are all available)
In this example, it should succeed since kind-skypilot is available.

Actual behavior:
sky check k8s will succeed if and only if the kubernetes current context (given by kubectl config current-context) is available, even if that context is not present in the list of allowed_contexts and all allowed_contexts are available.
In this example, it will fail since gke-dev is not available.

Version & Commit info:

  • sky -v: skypilot, version 1.0.0-dev0
  • sky -c: skypilot, commit a63eaf5-dirty
@romilbhardwaj romilbhardwaj added the k8s Kubernetes related items label Dec 9, 2024
@romilbhardwaj romilbhardwaj changed the title sky check k8s fails when current context is not available, even if that context is not in allowed_contexts [k8s] sky check k8s fails when current context is not available, even if that context is not in allowed_contexts Dec 11, 2024
@romilbhardwaj romilbhardwaj added the help wanted Extra attention is needed label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed k8s Kubernetes related items
Projects
None yet
Development

No branches or pull requests

2 participants