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

Allow running a local kubernetes cluster using kind #4088

Merged
merged 13 commits into from
May 14, 2022
Merged

Allow running a local kubernetes cluster using kind #4088

merged 13 commits into from
May 14, 2022

Conversation

epicfaace
Copy link
Member

@epicfaace epicfaace commented Apr 30, 2022

Allow running a local kubernetes cluster using kind (https://kind.sigs.k8s.io/). kind is a lightweight way to run kubernetes, which runs through a Docker container itself. This way, we can continue to use the Docker daemon for local development and not have to install additional things (for example, other local kubernetes deployments such as minikube require you to install and run a VM)

@epicfaace epicfaace changed the title Launch jobs directly through kubernetes Allow running a local kubernetes cluster Apr 30, 2022
@epicfaace epicfaace changed the title Allow running a local kubernetes cluster Allow running a local kubernetes cluster using kind Apr 30, 2022
@epicfaace epicfaace requested a review from teetone April 30, 2022 19:50
@epicfaace epicfaace marked this pull request as ready for review April 30, 2022 19:53
@epicfaace epicfaace requested a review from wwwjn May 1, 2022 02:52
@epicfaace
Copy link
Member Author

epicfaace commented May 1, 2022

Whoever reviews this, can you try the steps yourself? Note that while the cluster can communicate with codalab and run workers, it doesn't have access to Docker so it can't run actual bundles yet. #4090 allows workers in the cluster to also launch jobs.

@epicfaace epicfaace requested a review from percyliang May 1, 2022 02:56
Copy link
Collaborator

@teetone teetone 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 making Kubernetes development more convenient!

try:
user_id = getpass.getuser()
except Exception:
# Sometimes getpass.getuser() doesn't work.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it not work on the cluster? Should we error out instead?

Copy link
Member Author

@epicfaace epicfaace May 12, 2022

Choose a reason for hiding this comment

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

This error always comes up when I try to run a worker manager locally. I had to make the same change to get cs324 worker managers to work (#3949) so I thought I might as well add it in this PR.


## Start a local Kubernetes Batch Worker Manager (with kind, for testing / development only)

If you want to test or develop with kubernetes locally, follow these steps to do so:
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: capitalize Kubernetes

@mergify mergify bot merged commit 9515d28 into master May 14, 2022
@mergify mergify bot deleted the k8s branch May 14, 2022 21:30
@teetone teetone mentioned this pull request May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants