Installing the kubectl-kjob
plugin, kjobctl
.
make kubectl-kjob
sudo mv ./bin/kubectl-kjob /usr/local/bin/kubectl-kjob
kubectl-kjob printcrds | kubectl apply --server-side -f -
make install
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
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