-
Notifications
You must be signed in to change notification settings - Fork 551
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] Prototype - SkyServe on K8s #3109
Conversation
…o serve_k8s_playground # Conflicts: # sky/clouds/kubernetes.py # sky/serve/core.py
…o serve_k8s_playground # Conflicts: # sky/cli.py
…o serve_k8s_playground
…t-org/skypilot into serve_k8s_playground # Conflicts: # sky/serve/core.py # sky/serve/replica_managers.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the support sky serve on kubernetes @romilbhardwaj! Just did a quick pass and left several comments. : )
if endpoint: | ||
cluster_endpoint = backend_utils.get_endpoints( | ||
cluster_record['name'], endpoint) | ||
click.echo(cluster_endpoint) | ||
else: | ||
cluster_endpoints = backend_utils.get_endpoints( | ||
cluster_record['name']) | ||
assert isinstance(cluster_endpoints, dict) | ||
for port, port_endpoint in cluster_endpoints.items(): | ||
click.echo( | ||
f'{colorama.Fore.BLUE}{colorama.Style.BRIGHT}{port}' | ||
f'{colorama.Style.RESET_ALL}: ' | ||
f'{colorama.Fore.CYAN}{colorama.Style.BRIGHT}' | ||
f'{port_endpoint}{colorama.Style.RESET_ALL}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
if endpoint: | |
cluster_endpoint = backend_utils.get_endpoints( | |
cluster_record['name'], endpoint) | |
click.echo(cluster_endpoint) | |
else: | |
cluster_endpoints = backend_utils.get_endpoints( | |
cluster_record['name']) | |
assert isinstance(cluster_endpoints, dict) | |
for port, port_endpoint in cluster_endpoints.items(): | |
click.echo( | |
f'{colorama.Fore.BLUE}{colorama.Style.BRIGHT}{port}' | |
f'{colorama.Style.RESET_ALL}: ' | |
f'{colorama.Fore.CYAN}{colorama.Style.BRIGHT}' | |
f'{port_endpoint}{colorama.Style.RESET_ALL}') | |
cluster_endpoint = backend_utils.get_endpoints(cluster_record['name'], endpoint) | |
if endpoint: | |
click.echo(cluster_endpoint) | |
return | |
for port, port_endpoint in cluster_endpoints.items(): | |
click.echo( | |
f'{colorama.Fore.BLUE}{colorama.Style.BRIGHT}{port}' | |
f'{colorama.Style.RESET_ALL}: ' | |
f'{colorama.Fore.CYAN}{colorama.Style.BRIGHT}' | |
f'{port_endpoint}{colorama.Style.RESET_ALL}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backend_utils.get_endpoints()
is invoked differently in the two calls - one is with a specific endpoint, which returns a str, and the other is endpoint=None, which returns a dict.
@@ -23,6 +23,7 @@ | |||
from sky import exceptions | |||
from sky import global_user_state | |||
from sky import status_lib | |||
from sky.backends import backend_utils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importing backend_utils
here may caues circular import. We should be careful about this.
Since #3377 was merged, closing this PR for now. : ) |
Working prototype of SkyServe on k8s. Both the controller and the replicas are run on k8s cluster.
TODOs
Automatically invoke- no longer required with SA supportgenerate_static_kubeconfig.sh
for exec based kubeconfigssky-key
and instead use the solution from [k8s] Share SSH jump pod #2826 to allow multiple keys to auth to ssh jump podquery_endpoints
implementation.Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py