|
| 1 | +# Installation |
| 2 | + |
| 3 | +## Before you begin |
| 4 | + |
| 5 | +Make sure the following conditions are met: |
| 6 | + |
| 7 | +- A Kubernetes cluster with version 1.21 or newer is running. Learn how to [install the Kubernetes tools](https://kubernetes.io/docs/tasks/tools/). |
| 8 | +- The `SuspendJob` [feature gate][feature_gate] is enabled. In Kubernetes 1.22 or newer, the feature gate is enabled by default and reached stable in Kubernetes 1.24. |
| 9 | +- The kubectl command-line tool has communication with your cluster. |
| 10 | + |
| 11 | +<!-- Uncomment once jobset publishes metrics --> |
| 12 | +<!-- JobSet publishes [metrics](/docs/reference/metrics) to monitor its operators. --> |
| 13 | +<!-- You can scrape these metrics with Prometheus. --> |
| 14 | +<!-- Use [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) --> |
| 15 | +<!-- if you don't have your own monitoring system. --> |
| 16 | + |
| 17 | +<!-- The webhook server in JobSet uses an internal cert management for provisioning certificates. If you want to use --> |
| 18 | +<!-- a third-party one, e.g. [cert-manager](https://github.com/cert-manager/cert-manager), follow these steps: --> |
| 19 | +<!-- 1. Set `internalCertManagement.enable` to `false` in [config file](#install-a-custom-configured-released-version). --> |
| 20 | +<!-- 2. Comment out the `internalcert` folder in `config/default/kustomization.yaml`. --> |
| 21 | +<!-- 3. Enable `cert-manager` in `config/default/kustomization.yaml` and uncomment all sections with 'CERTMANAGER'. --> |
| 22 | + |
| 23 | +[feature_gate]: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/ |
| 24 | + |
| 25 | + |
| 26 | +<!-- Uncomment once we release the first version --> |
| 27 | +<!-- ## Install a released version --> |
| 28 | + |
| 29 | +<!-- To install a released version of Jobset in your cluster, run the following command: --> |
| 30 | + |
| 31 | +<!-- ```shell --> |
| 32 | +<!-- VERSION=v0.1.0 --> |
| 33 | +<!-- kubectl apply -f https://github.com/kubernetes-sigs/jobset/releases/download/$VERSION/manifests.yaml --> |
| 34 | +<!-- ``` --> |
| 35 | + |
| 36 | +<!-- <\!-- Uncomment once we have a prometheus setup -\-> --> |
| 37 | +<!-- <\!-- ### Add metrics scraping for prometheus-operator -\-> --> |
| 38 | + |
| 39 | +<!-- <\!-- _Available in JobSet v0.2.1 and later_ -\-> --> |
| 40 | + |
| 41 | +<!-- <\!-- To allow [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator) -\-> --> |
| 42 | +<!-- <\!-- to scrape metrics from jobset components, run the following command: -\-> --> |
| 43 | + |
| 44 | +<!-- <\!-- ```shell -\-> --> |
| 45 | +<!-- <\!-- kubectl apply -f https://github.com/kubernetes-sigs/jobset/releases/download/$VERSION/prometheus.yaml -\-> --> |
| 46 | +<!-- ``` --> |
| 47 | + |
| 48 | +<!-- ### Uninstall --> |
| 49 | + |
| 50 | +<!-- To uninstall a released version of JobSet from your cluster, run the following command: --> |
| 51 | + |
| 52 | +<!-- ```shell --> |
| 53 | +<!-- VERSION=v0.1.0 --> |
| 54 | +<!-- kubectl delete -f https://github.com/kubernetes-sigs/jobset/releases/download/$VERSION/manifests.yaml --> |
| 55 | +<!-- ``` --> |
| 56 | + |
| 57 | +<!-- <\!-- Uncomment once we have component config setup -\-> --> |
| 58 | +<!-- <\!-- ## Install a custom-configured released version -\-> --> |
| 59 | + |
| 60 | +<!-- <\!-- To install a custom-configured released version of JobSet in your cluster, execute the following steps: -\-> --> |
| 61 | + |
| 62 | +<!-- <\!-- 1. Download the release's `manifests.yaml` file: -\-> --> |
| 63 | + |
| 64 | +<!-- <\!-- ```shell -\-> --> |
| 65 | +<!-- <\!-- VERSION=v0.1.0 -\-> --> |
| 66 | +<!-- <\!-- wget https://github.com/kubernetes-sigs/jobset/releases/download/$VERSION/manifests.yaml -\-> --> |
| 67 | +<!-- <\!-- ``` -\-> --> |
| 68 | +<!-- <\!-- 2. With an editor of your preference, open `manifests.yaml`. -\-> --> |
| 69 | +<!-- <\!-- 3. In the `jobset-manager-config` ConfigMap manifest, edit the -\-> --> |
| 70 | +<!-- <\!-- `controller_manager_config.yaml` data entry. The entry represents -\-> --> |
| 71 | +<!-- <\!-- the default JobSet Configuration -\-> --> |
| 72 | +<!-- <\!-- struct ([[email protected]](https://pkg.go.dev/sigs.k8s.io/[email protected]/apis/config/v1alpha1#Configuration)). -\-> --> |
| 73 | +<!-- <\!-- The contents of the ConfigMap are similar to the following: -\-> --> |
| 74 | + |
| 75 | + |
| 76 | +<!-- <\!-- ```yaml -\-> --> |
| 77 | +<!-- <\!-- apiVersion: v1 -\-> --> |
| 78 | +<!-- <\!-- kind: ConfigMap -\-> --> |
| 79 | +<!-- <\!-- metadata: -\-> --> |
| 80 | +<!-- <\!-- name: jobset-manager-config -\-> --> |
| 81 | +<!-- <\!-- namespace: jobset-system -\-> --> |
| 82 | +<!-- <\!-- data: -\-> --> |
| 83 | +<!-- <\!-- controller_manager_config.yaml: | -\-> --> |
| 84 | +<!-- <\!-- apiVersion: config.jobset.x-k8s.io/v1alpha1 -\-> --> |
| 85 | +<!-- <\!-- kind: Configuration -\-> --> |
| 86 | +<!-- <\!-- namespace: jobset-system -\-> --> |
| 87 | +<!-- <\!-- health: -\-> --> |
| 88 | +<!-- <\!-- healthProbeBindAddress: :8081 -\-> --> |
| 89 | +<!-- <\!-- metrics: -\-> --> |
| 90 | +<!-- <\!-- bindAddress: :8080 -\-> --> |
| 91 | +<!-- <\!-- webhook: -\-> --> |
| 92 | +<!-- <\!-- port: 9443 -\-> --> |
| 93 | +<!-- <\!-- internalCertManagement: -\-> --> |
| 94 | +<!-- <\!-- enable: true -\-> --> |
| 95 | +<!-- <\!-- webhookServiceName: jobset-webhook-service -\-> --> |
| 96 | +<!-- <\!-- webhookSecretName: jobset-webhook-server-cert -\-> --> |
| 97 | +<!-- <\!-- ``` -\-> --> |
| 98 | + |
| 99 | +<!-- <\!-- 3. Apply the customized manifests to the cluster: -\-> --> |
| 100 | + |
| 101 | +<!-- <\!-- ```shell -\-> --> |
| 102 | +<!-- <\!-- kubectl apply -f manifests.yaml -\-> --> |
| 103 | +<!-- <\!-- ``` -\-> --> |
| 104 | + |
| 105 | +## Install the latest development version |
| 106 | + |
| 107 | +To install the latest development version of Jobset in your cluster, run the |
| 108 | +following command: |
| 109 | + |
| 110 | +```shell |
| 111 | +kubectl apply -k github.com/kubernetes-sigs/jobset/config/default?ref=main |
| 112 | +``` |
| 113 | + |
| 114 | +The controller runs in the `jobset-system` namespace. |
| 115 | + |
| 116 | +### Uninstall |
| 117 | + |
| 118 | +To uninstall JobSet, run the following command: |
| 119 | + |
| 120 | +```shell |
| 121 | +kubectl delete -k github.com/kubernetes-sigs/jobset/config/default |
| 122 | +``` |
| 123 | + |
| 124 | +## Build and install from source |
| 125 | + |
| 126 | +To build Jobset from source and install Jobset in your cluster, run the following |
| 127 | +commands: |
| 128 | + |
| 129 | +```sh |
| 130 | +git clone https://github.com/kubernetes-sigs/jobset.git |
| 131 | +cd jobset |
| 132 | +IMAGE_REGISTRY=<registry>/<project> make image-push deploy |
| 133 | +``` |
| 134 | + |
| 135 | +<!-- Uncomment once we have a prometheus setup --> |
| 136 | +<!-- ### Add metrics scraping for prometheus-operator --> |
| 137 | + |
| 138 | +<!-- To allow [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator) --> |
| 139 | +<!-- to scrape metrics from jobset components, run the following command: --> |
| 140 | + |
| 141 | +<!-- ```shell --> |
| 142 | +<!-- make prometheus --> |
| 143 | +<!-- ``` --> |
| 144 | + |
| 145 | +### Uninstall |
| 146 | + |
| 147 | +To uninstall JobSet, run the following command: |
| 148 | + |
| 149 | +```sh |
| 150 | +make undeploy |
| 151 | +``` |
0 commit comments