Make sure the following conditions are met:
- A Kubernetes cluster with version 1.21 or newer is running. Learn how to install the Kubernetes tools.
- The
SuspendJob
feature gate is enabled. In Kubernetes 1.22 or newer, the feature gate is enabled by default and reached stable in Kubernetes 1.24. - The kubectl command-line tool has communication with your cluster.
To install a released version of Jobset in your cluster, run the following command:
VERSION=v0.2.1
kubectl apply --server-side -f https://github.com/kubernetes-sigs/jobset/releases/download/$VERSION/manifests.yaml
If you are using prometheus-operator to scrape metrics from jobset components, run the following command:
VERSION=v0.2.1
kubectl apply -f https://github.com/kubernetes-sigs/jobset/releases/download/$VERSION/prometheus.yaml
If you are using kube-prometheus, metrics can be scraped without performing this step.
To uninstall a released version of JobSet from your cluster, run the following command:
VERSION=v0.2.1
kubectl delete -f https://github.com/kubernetes-sigs/jobset/releases/download/$VERSION/manifests.yaml
To install the latest development version of Jobset in your cluster, run the following command:
kubectl apply --server-side -k github.com/kubernetes-sigs/jobset/config/default?ref=main
The controller runs in the jobset-system
namespace.
If you are using prometheus-operator to scrape metrics from jobset components, you need to run the following command so it can access the metrics:
kubectl apply --server-side -k github.com/kubernetes-sigs/jobset/config/prometheus?ref=main
If you are using kube-prometheus, metrics can be scraped without performing this step.
To uninstall JobSet, run the following command:
kubectl delete -k github.com/kubernetes-sigs/jobset/config/default
To build Jobset from source and install Jobset in your cluster, run the following commands:
git clone https://github.com/kubernetes-sigs/jobset.git
cd jobset
IMAGE_REGISTRY=<registry>/<project> make image-push deploy
If you are using prometheus-operator to scrape metrics from jobset components, you need to run the following command so it has access to the metrics:
make prometheus
If you are using kube-prometheus, metrics can be scraped without performing this step.
To uninstall JobSet, run the following command:
make undeploy
JobSet webhooks use an internal certificate by default. However, if you wish to use cert-manager (which supports cert rotation), instead of internal cert, you can by performing the following steps.
First, install cert-manager on your cluster by running the following command:
VERSION=v1.11.0
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/$VERSION/cert-manager.yaml
Next, in the file jobset/config/default/kustomization.yaml
replace ../components/internalcert
with
../components/certmanager
then uncomment all the lines beginning with [CERTMANAGER]
.
Finally, apply these configurations to your cluster with kubectl apply --server-side -k config/default
.