-
Notifications
You must be signed in to change notification settings - Fork 670
[Feat][Kubectl-Plugin] Implement kubectl session for RayJob and RayService #2379
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
[Feat][Kubectl-Plugin] Implement kubectl session for RayJob and RayService #2379
Conversation
|
@kevin85421 @andrewsykim PTAL |
e069d65 to
c4b5964
Compare
|
cc @chiayi |
|
|
||
| sessionExample = templates.Examples(` | ||
| # Forward local ports to the RayCluster resource | ||
| kubectl ray session raycluster/my-raycluster |
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.
Will this default to raycluster if the resource type is not specified?
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.
No. Now the resource type is required. Do you think it is better to default to RayCluster if the resource type is not specified?
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.
Do you think it is better to default to RayCluster if the resource type is not specified?
Personally, yes I think so. Similar to how kubectl logs defaults the resource type to Pods, I think we should default the resource type to RayCluster
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.
Make senses to me. Updated in e83ee5b
chiayi
left a comment
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.
LGTM! Thanks for creating the util package as well!
andrewsykim
left a comment
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.
Minor comment, otherwise LGTM
kevin85421
left a comment
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.
I haven't reviewed the PR, but based on the screenshot, I think we don't need to forward the Ray client port for RayJob and RayService. In addition, could you print the information to specify which K8s service is being forwarded?
e83ee5b to
0fa67b9
Compare
|
@kevin85421 Port-forwarding for RayJob and RayService removed. Also the screenshot is updated. |
|
TODO: Use |
|
@kevin85421 I find that they are the same because kubectl source code first find the corresponding pod selected by the service. Tested by setting breakpoints in IDE (please see the value of Notice that different Therefore I think we can keep the current implementation because execute multiple |
What is the behavior of forwarding |
…rvice Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
…ward for RayJob and RayService Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
…ervice svc Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
0fa67b9 to
12e7abe
Compare
|
@kevin85421 After experiment, the Explanation of the following screenshot:
|
|
Note: If we port-forward a K8s service, it will pick a Pod under the hood. If the Pod is killed, the port-forward command will not pick other K8s service endpoints automatically. Instead, we need to run the port-forward command again. |
|
Could we run the port forward in a go routine and retry the connection if it fails? |
make sense |
|
open an issue to track the progress: #2388 |
Why are these changes needed?
#2298 only implemented
kubectl ray sessionforRayCluster. This PR implementskubectl sessionforRayJobandRayService.Related issue number
N/A
Checks