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

REP: Ray Kubectl Plugin #52

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

andrewsykim
Copy link
Contributor

Add REP for a Ray Kubectl Plugin


## Implementation Details

The kubectl plugin will be developed in the cli directory, replacing the current KubeRay CLI. While the kubectl plugin will overlap with the existing KubeRay CLI in some ways (especially in managing KubeRay cluster), it will go further by enhancing day-to-day operations with Ray clusters. These enhancements include authenticating to clusters, establishing local sessions, submitting jobs, and scaling clusters. In addition, the kubectl plugin will not depend on the KubeRay API server, making it viable for a larger audience of KubeRay users.
Copy link
Member

Choose a reason for hiding this comment

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

I am OK with deprecating the existing KubeRay CLI. I have never heard of any user using it.

$ kubectl ray job submit --cluster my-cluster --image=image:tag -- python job.py
```

### Ray Session - Interactive Client / Dashboard
Copy link
Member

Choose a reason for hiding this comment

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

We should reconsider whether we want to support port forwarding for the Ray client or not. It has not been actively maintained for more than a year. The Ray community doesn't recommend users use it. We have had some internal discussions about building a Ray client 2.0 to solve its stability issues, but it has not happened yet.


MVP Scope:
* `kubectl ray cluster get|list`
* `kubectl ray cluster get|list`
Copy link
Member

Choose a reason for hiding this comment

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

This is a duplicate of the line above.

The CLI will extend kubectl using kubectl’s plugin mechanism. See [Extend kubectl with plugins](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/) for more details.

MVP Scope:
* `kubectl ray cluster get|list`
Copy link
Member

Choose a reason for hiding this comment

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

Do we need list? kubectl doesn't support list. Maybe we can use

kubectl ray get cluster # list all RayCluster CRs
kubectl ray get cluster $CR_NAME # Get the RayCluster CR

* `kubectl ray cluster session`
* `kubectl ray cluster dashboard`
* `kubectl ray cluster logs`

Copy link
Member

Choose a reason for hiding this comment

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

We can also support get RayJob.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added to future scope for now

### Ray Job Submissions (using RayJob)

```
$ kubectl ray job submit --cluster my-cluster --image=image:tag -- python job.py
Copy link

Choose a reason for hiding this comment

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

Would it be a pre-requisite for my-cluster to pre-exist before job submission? Or could this command create the cluster if not available, then submit?

Copy link
Member

Choose a reason for hiding this comment

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

Would it be a pre-requisite for my-cluster to pre-exist before job submission?

Currently, yes.

Or could this command create the cluster if not available, then submit?

This is planned for future work. The MVP only includes reading operations for the Kubernetes API server; the writing operations are not included in the MVP.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My intention for the kubectl ray job submit command is that it will create a RayJob. If you don't speify --cluster, the RayJob will be configured to create a new RayCluster for the job.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As @kevin85421 said this is not in MVP scope and will be developed after the initial kubectl ray cluster functionality

Copy link
Member

Choose a reason for hiding this comment

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

@kevin85421
Copy link
Member

cc @jjyao: Could we merge this PR, or do we still have another process to complete?

Signed-off-by: Andrew Sy Kim <[email protected]>
@zhe-thoughts zhe-thoughts merged commit 1c450dc into ray-project:main Jun 18, 2024
1 check passed
@kevin85421
Copy link
Member

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.

4 participants