Installation
- Before you begin
- Install a released version
- Install the latest development version
- Build and install from source
- Install in a different namespace
- Optional: Use cert manager instead of internal cert
- Install with Helm chart
Before you begin
Make sure the following conditions are met:
- A Kubernetes cluster with version >= 1.26 is Required, or it will behave unexpected. Learn how to install the Kubernetes tools.
- For any cluster with version 1.26, you need to enable the feature gate for Start Ordinal manually. For version greater than 1.26, it’s enabled by default.
- Rolling update with max unavailable Pods, you must enable the MaxUnavailableStatefulSet feature gate, which is still in alpha since Kubernetes v1.24, see discussion here. Or lws will roll out the pods one by one.
- Your cluster has at least 1 node with 1+ CPUs and 1G of memory available for the LeaderWorkerSet controller manager Deployment to run on. NOTE: On some cloud providers, the default node machine type will not have sufficient resources to run the LeaderWorkerSet controller manager and all the required kube-system pods, so you’ll need to use a larger machine type for your nodes.
- The kubectl command-line tool has communication with your cluster.
Install a released version
To install a released version of LeaderWorkerSet in your cluster, run the following command:
Uninstall
To uninstall a released version of LeaderWorkerSet from your cluster, run the following command:
Install the latest development version
To install the latest development version of LeaderWorkerSet in your cluster, run the following command:
The controller runs in the lws-system
namespace.
Uninstall
To uninstall LeaderWorkerSet, run the following command:
Build and install from source
To build LeaderWorkerSet from source and install LeaderWorkerSet in your cluster, run the following commands:
Uninstall
To uninstall LeaderWorkerSet, run the following command:
Install in a different namespace
To install the leaderWorkerSet controller in a different namespace rather than lws-system
, you should first:
Then change the kustomization.yaml namespace field as:
Optional: Use cert manager instead of internal cert
The 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:
Next, in the file lws/config/default/kustomization.yaml
replace ../internalcert
with
../certmanager
then uncomment all the lines beginning with [CERTMANAGER]
.
Finally, install the cert manager follwing the link: https://cert-manager.io/docs/installation/#default-static-install
and apply these configurations to your cluster with kubectl apply --server-side -k config/default
.
Install with Helm chart
See lws/charts