|
| 1 | +--- |
| 2 | +title: Installation |
| 3 | +order: 2 |
| 4 | +--- |
| 5 | + |
| 6 | +This section covers the various aspects of installing the Operator. |
| 7 | + |
| 8 | +::: important |
| 9 | +The Operator is an Enterprise-only feature, please [contact us](https://www.kurrent.io/contact) for more information. |
| 10 | +::: |
| 11 | + |
| 12 | +## Prerequisites |
| 13 | + |
| 14 | +::: tip |
| 15 | +To get the best out of this guide, a basic understanding of [Kubernetes concepts](https://kubernetes.io/docs/concepts/) is essential. |
| 16 | +::: |
| 17 | + |
| 18 | +* A Kubernetes cluster running any [non-EOL version of Kubernetes](https://kubernetes.io/releases/). |
| 19 | +* Permission to create resources, deploy the Operator and install CRDs in the target cluster. |
| 20 | +* The following CLI tools installed, on your shell’s `$PATH`, with `$KUBECONFIG` pointing to your cluster: |
| 21 | + * [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl) |
| 22 | + * [k9s](https://k9scli.io/topics/install/) |
| 23 | + * [Helm 3 CLI](https://helm.sh/docs/intro/install/) |
| 24 | + * A valid Operator license. Please [contact us](https://www.kurrent.io/contact) for more information. |
| 25 | + |
| 26 | +## Configure Helm Repository |
| 27 | + |
| 28 | +Add the Kurrent Helm repository to your local environment: |
| 29 | + |
| 30 | +```bash |
| 31 | +helm repo add kurrent-latest \ |
| 32 | + 'https://packages.kurrent.io/basic/kurrent-latest/helm/charts/' |
| 33 | +``` |
| 34 | + |
| 35 | +## Install Custom Resource Definitions (CRDs) |
| 36 | + |
| 37 | +The Operator uses Custom Resource Definitions (CRDs) to extend Kubernetes. You can install them automatically with Helm or manually. |
| 38 | + |
| 39 | +The following resource types are supported: |
| 40 | +- [KurrentDB](resource-types.md#kurrentdb) |
| 41 | +- [KurrentDBBackup](resource-types.md#kurrentdbbackup) |
| 42 | + |
| 43 | +Since CRDs are managed globally by Kubernetes, special care must be taken to install them. |
| 44 | + |
| 45 | +### Automatic Install |
| 46 | + |
| 47 | +It's recommended to install and manage the CRDs using Helm. See [Deployment Modes](#deployment-modes) for more information. |
| 48 | + |
| 49 | +### Manual Install |
| 50 | + |
| 51 | +If you prefer to install CRDs yourself: |
| 52 | + |
| 53 | +```bash |
| 54 | +# Download the kurrentdb-operator Helm chart |
| 55 | +helm pull kurrent-latest/kurrentdb-operator --version 1.3.0 --untar |
| 56 | +# Install the CRDs |
| 57 | +kubectl apply -f kurrentdb-operator/crds |
| 58 | +``` |
| 59 | +*Expected Output*: |
| 60 | +``` |
| 61 | +customresourcedefinition.apiextensions.k8s.io/kurrentdbbackups.kubernetes.kurrent.io created |
| 62 | +customresourcedefinition.apiextensions.k8s.io/kurrentdbs.kubernetes.kurrent.io created |
| 63 | +``` |
| 64 | + |
| 65 | +After installing CRDs manually, you should include the `--skip-crds` flag for the `helm install` and |
| 66 | +`helm upgrade` commands. |
| 67 | + |
| 68 | +## Deployment Modes |
| 69 | + |
| 70 | +The Operator can be scoped to track Kurrent resources across **all** or **specific** namespaces. |
| 71 | + |
| 72 | +### Cluster-wide |
| 73 | + |
| 74 | +In cluster-wide mode, the Operator tracks Kurrent resources across **all** namespaces and requires `ClusterRole`. Helm creates the ClusteRole automatically. |
| 75 | + |
| 76 | +To deploy the Operator in this mode, run: |
| 77 | + |
| 78 | +```bash |
| 79 | +helm install kurrentdb-operator kurrent-latest/kurrentdb-operator \ |
| 80 | + --version 1.3.0 \ |
| 81 | + --namespace kurrent \ |
| 82 | + --create-namespace \ |
| 83 | + --set-file operator.license.key=/path/to/license.key \ |
| 84 | + --set-file operator.license.file=/path/to/license.lic |
| 85 | +``` |
| 86 | + |
| 87 | +This command: |
| 88 | +- Deploys the Operator into the `kurrent` namespace (use `--create-namespace` to create it). Feel free to modify this namespace. |
| 89 | +- Creates the namespace (if it already exists, leave out the `--create-namespace` flag). |
| 90 | +- Deploys CRDs (this can be skipped by removing `--skip-crds`). |
| 91 | +- Applys the Operator license. |
| 92 | +- Deploys a new Helm release called `kurrentdb-operator` in the `kurrent` namespace. |
| 93 | + |
| 94 | +*Expected Output*: |
| 95 | +``` |
| 96 | +NAME: kurrentdb-operator |
| 97 | +LAST DEPLOYED: Thu Mar 20 14:51:42 2025 |
| 98 | +NAMESPACE: kurrent |
| 99 | +STATUS: deployed |
| 100 | +REVISION: 1 |
| 101 | +TEST SUITE: None |
| 102 | +``` |
| 103 | + |
| 104 | +Once installed, navigate to the [deployment validation](#deployment-validation) section. |
| 105 | + |
| 106 | +### Specific Namespace(s) |
| 107 | + |
| 108 | +In this mode, the Operator will track Kurrent resources across **specific** namespaces. This mode reduces the level of permissions required. The Operator will create a `Role` in each namespace that it is expected to manage. |
| 109 | + |
| 110 | +To deploy the Operator in this mode, the following command can be used: |
| 111 | + |
| 112 | +```bash |
| 113 | +helm install kurrentdb-operator kurrent-latest/kurrentdb-operator \ |
| 114 | + --version 1.3.0 \ |
| 115 | + --namespace kurrent \ |
| 116 | + --create-namespace \ |
| 117 | + --set-file operator.license.key=/path/to/license.key \ |
| 118 | + --set-file operator.license.file=/path/to/license.lic \ |
| 119 | + --set operator.namespaces='{kurrent, foo}' |
| 120 | +``` |
| 121 | + |
| 122 | +Here's what the command does: |
| 123 | +- Sets the namespace of where the Operator will be deployed i.e. `kurrent` (feel free to change this) |
| 124 | +- Creates the namespace (if it already exists, leave out the `--create-namespace` flag) |
| 125 | +- Deploys CRDs (this can be skipped by setting `--skip-crds`) |
| 126 | +- Configures the Operator license |
| 127 | +- Configures the Operator to operate on resources the namespaces `kurrent` and `foo` |
| 128 | +- Deploys a new Helm release called `kurrentdb-operator` in the `kurrent` namespace |
| 129 | + |
| 130 | +::: important |
| 131 | +Make sure the namespaces listed as part of the `operator.namespaces` parameter already exist before running the command. |
| 132 | +::: |
| 133 | + |
| 134 | +*Expected Output*: |
| 135 | +``` |
| 136 | +NAME: kurrentdb-operator |
| 137 | +LAST DEPLOYED: Thu Mar 20 14:51:42 2025 |
| 138 | +NAMESPACE: kurrent |
| 139 | +STATUS: deployed |
| 140 | +REVISION: 1 |
| 141 | +TEST SUITE: None |
| 142 | +``` |
| 143 | + |
| 144 | +Once installed, navigate to the [deployment validation](#deployment-validation) section. |
| 145 | + |
| 146 | +#### Augmenting Namespaces |
| 147 | + |
| 148 | +The Operator deployment can be updated to adjust which namespaces are watched. For example, in addition to the `kurrent` and `foo` namespaces (from the example above), a new namespace `bar` may also be watched using the command below: |
| 149 | + |
| 150 | +```bash |
| 151 | +helm upgrade kurrentdb-operator kurrent-latest/kurrentdb-operator \ |
| 152 | + --version 1.3.0 \ |
| 153 | + --namespace kurrent \ |
| 154 | + --reuse-values \ |
| 155 | + --set operator.namespaces='{kurrent,foo,bar}' |
| 156 | +``` |
| 157 | + |
| 158 | +This will trigger: |
| 159 | +- a new `Role` to be created in the `bar` namespace |
| 160 | +- a rolling restart of the Operator to pick up the new configuration changes |
| 161 | + |
| 162 | +## Deployment Validation |
| 163 | + |
| 164 | +Using the k9s tool, navigate to the namespace listing using the command `:namespaces`. It should show the namespace where the Operator was deployed: |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | +After stepping in to the `kurrent` namespace, type `:deployments` in the k9s console. It should show the following: |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | +Pods may also be viewed using the `:pods` command, for example: |
| 173 | + |
| 174 | + |
| 175 | + |
| 176 | +Pressing the `Return` key on the selected Operator pod will allow you to drill through the container hosted in the pod, and then finally to the logs: |
| 177 | + |
| 178 | + |
| 179 | + |
| 180 | + |
| 181 | +## Upgrading an Installation |
| 182 | + |
| 183 | +The Operator can be upgraded using the following `helm` commands: |
| 184 | + |
| 185 | +```bash |
| 186 | +helm repo update |
| 187 | +helm upgrade kurrentdb-operator kurrentdb-operator-repo/kurrentdb-operator \ |
| 188 | + --namespace kurrent \ |
| 189 | + --version {version} |
| 190 | +``` |
| 191 | + |
| 192 | +Here's what these commands do: |
| 193 | +- Refresh the local Helm repository index |
| 194 | +- Locates an existing operator installation in namespace `kurrent` |
| 195 | +- Selects the target upgrade version `{version}` e.g. `1.3.0` |
| 196 | +- Performs the upgrade, preserving values that were set during installation |
0 commit comments