Skip to content

kubernetes-sigs/kjob

kjob

KJob: Tool for CLI-loving ML researchers

Description

The kubectl-kjob plugin, kjobctl, allows you to list, describe and create jobs.

Read the overview to learn more.

Getting Started

Prerequisites

  • go version v1.23+
  • kubectl version v1.27+.
  • Access to a Kubernetes v1.27+ cluster.

To Install

Install the CRDs into the cluster:

make install

Install kubectl kjob plugin:

make kubectl-kjob
sudo cp ./bin/kubectl-kjob /usr/local/bin/kubectl-kjob

Additionally, you can create an alias kjobctl to allow shorter syntax:

echo 'alias kjobctl="kubectl kjob"' >> ~/.bashrc
# Or if you are using ZSH
echo 'alias kjobctl="kubectl kjob"' >> ~/.zshrc

Autocompletion:

echo '[[ $commands[kubectl-kjob] ]] && source <(kubectl-kjob completion bash)' >> ~/.bashrc
# Or if you are using ZSH
echo '[[ $commands[kubectl-kjob] ]] && source <(kubectl-kjob completion zsh)' >> ~/.zshrc

cat <<EOF >kubectl_complete-kjob
#!/usr/bin/env sh

# Call the __complete command passing it all arguments
kubectl kjob __complete "\$@"
EOF

chmod u+x kubectl_complete-kjob
sudo mv kubectl_complete-kjob /usr/local/bin/kubectl_complete-kjob

To Uninstall

Delete the APIs(CRDs) from the cluster:

make uninstall

Delete kubectl kjob plugin:

sudo rm /usr/local/bin/kubectl-kjob

NOTE: Run make help for more information on all potential make targets

License

Copyright 2024 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

About

KJob: Tool for CLI-loving ML researchers

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •